Commit b41d5459717694822a75c2ff507930b238cc34e8

Authored by Yarik
0 parents

first commit

Showing 268 changed files with 14810 additions and 0 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 268 files are displayed.

.bowerrc 0 → 100755
  1 +++ a/.bowerrc
  1 +{
  2 + "directory" : "vendor/bower"
  3 +}
... ...
.gitignore 0 → 100755
  1 +++ a/.gitignore
  1 +# yii console command
  2 +/yii
  3 +
  4 +# phpstorm project files
  5 +.idea
  6 +
  7 +# netbeans project files
  8 +nbproject
  9 +
  10 +# zend studio for eclipse project files
  11 +.buildpath
  12 +.project
  13 +.settings
  14 +
  15 +# windows thumbnail cache
  16 +Thumbs.db
  17 +
  18 +# composer vendor dir
  19 +/vendor
  20 +
  21 +# composer itself is not needed
  22 +composer.phar
  23 +
  24 +# Mac DS_Store Files
  25 +.DS_Store
  26 +
  27 +# phpunit itself is not needed
  28 +phpunit.phar
  29 +# local phpunit config
  30 +/phpunit.xml
  31 +
  32 +# vagrant runtime
  33 +/.vagrant
... ...
.htaccess 0 → 100755
  1 +++ a/.htaccess
  1 +AddDefaultCharset utf-8
  2 +Header set Expires "Thu, 19 Nov 1981 08:52:00 GM"
  3 +Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
  4 +Header set Pragma "no-cache"
  5 +<IfModule mod_rewrite.c>
  6 +
  7 +
  8 + Options +FollowSymlinks
  9 +
  10 + RewriteEngine On
  11 +
  12 +</IfModule>
  13 +
  14 +<IfModule mod_rewrite.c>
  15 +
  16 + RewriteBase /
  17 + # deal with admin first
  18 +
  19 +
  20 +
  21 +
  22 + RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT]
  23 +
  24 + RewriteCond %{REQUEST_URI} ^/(admin)
  25 +
  26 +
  27 +
  28 + RewriteRule ^admin/assets/(.*)$ backend/web/assets/$1 [L]
  29 +
  30 + RewriteRule ^admin/css/(.*)$ backend/web/css/$1 [L]
  31 +
  32 + RewriteRule ^admin/js/(.*)$ backend/web/js/$1 [L]
  33 +
  34 + RewriteRule ^admin/images/(.*)$ backend/web/images/$1 [L]
  35 +
  36 + RewriteRule ^admin/fonts/(.*)$ backend/web/fonts/$1 [L]
  37 +
  38 +
  39 +
  40 +
  41 +
  42 + RewriteCond %{REQUEST_URI} !^/backend/web/(assets|css|js|images|fonts)/
  43 +
  44 + RewriteCond %{REQUEST_URI} ^/(admin)
  45 +
  46 + RewriteRule ^.*$ backend/web/index.php [L]
  47 +
  48 +
  49 + RewriteCond %{REQUEST_URI} ^/(assets|css)
  50 +
  51 + RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
  52 +
  53 + RewriteRule ^css/(.*)$ frontend/web/css/$1 [L]
  54 +
  55 + RewriteRule ^js/(.*)$ frontend/web/js/$1 [L]
  56 +
  57 + RewriteRule ^images/(.*)$ frontend/web/images/$1 [L]
  58 +
  59 + RewriteRule ^libraries/(.*)$ frontend/web/libraries/$1 [L]
  60 +
  61 + RewriteRule ^img/(.*)$ frontend/web/img/$1 [L]
  62 +
  63 + RewriteRule ^files/(.*)$ frontend/web/files/$1 [L]
  64 +
  65 + RewriteRule ^fonts/(.*)$ frontend/web/fonts/$1 [L]
  66 +
  67 + RewriteRule robots.txt$ frontend/web/robots.txt [L]
  68 +
  69 +
  70 + RewriteCond %{REQUEST_URI} !^/(frontend|backend)/web/(assets|css|txt|js|images|fonts|img|files)/
  71 +
  72 + RewriteCond %{REQUEST_URI} !index.php
  73 +
  74 + RewriteCond %{REQUEST_FILENAME} !-f [OR]
  75 +
  76 + RewriteCond %{REQUEST_FILENAME} !-d
  77 +
  78 +
  79 + RewriteCond %{HTTP_HOST} ^www\.(.*)
  80 + RewriteRule ^(.*)$ frontend/web/index.php
  81 +
  82 +
  83 + RewriteCond %{HTTP_HOST} ^([^www].*)$
  84 + RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  85 +
  86 + RewriteCond %{THE_REQUEST} \s/+(.+?)/+[?\s]
  87 + RewriteRule /$ /%1 [R,L]
  88 +
  89 +
  90 +
  91 +
  92 +# RewriteCond %{HTTP_HOST} ^([^www].*)$
  93 +# RewriteRule ^(.*)$ http://www.%1/$1 [R=301]
  94 +
  95 +</IfModule>
  96 +
  97 +#для возможности загрузки файлов парсера
  98 +<IfModule mod_php5.c>
  99 + php_value upload_max_filesize 20M
  100 + php_value post_max_size 30M
  101 +</IfModule>
  102 +
  103 +
  104 +# кеширование в браузере на стороне пользователя
  105 +#<IfModule mod_expires.c>
  106 +#ExpiresActive On
  107 +#ExpiresDefault "access 7 days"
  108 +#ExpiresByType application/javascript "access plus 1 year"
  109 +#ExpiresByType text/javascript "access plus 1 year"
  110 +#ExpiresByType text/css "access plus 1 year"
  111 +#ExpiresByType text/html "access plus 7 day"
  112 +#ExpiresByType text/x-javascript "access 1 year"
  113 +#ExpiresByType image/gif "access plus 1 year"
  114 +#ExpiresByType image/jpeg "access plus 1 year"
  115 +#ExpiresByType image/png "access plus 1 year"
  116 +#ExpiresByType image/jpg "access plus 1 year"
  117 +#ExpiresByType image/x-icon "access 1 year"
  118 +#ExpiresByType application/x-shockwave-flash "access 1 year"
  119 +#</IfModule>
  120 +#
  121 +#<IfModule mod_deflate.c>
  122 +#AddOutputFilterByType DEFLATE text/plain
  123 +#AddOutputFilterByType DEFLATE text/html
  124 +#AddOutputFilterByType DEFLATE text/xml
  125 +#AddOutputFilterByType DEFLATE text/css
  126 +#AddOutputFilterByType DEFLATE application/xml
  127 +#AddOutputFilterByType DEFLATE application/xhtml+xml
  128 +#AddOutputFilterByType DEFLATE application/rss+xml
  129 +#AddOutputFilterByType DEFLATE application/javascript
  130 +#AddOutputFilterByType DEFLATE application/x-javascript
  131 +#BrowserMatch ^Mozilla/4 gzip-only-text/html
  132 +#BrowserMatch ^Mozilla/4\.0[678] no-gzip
  133 +#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  134 +#Header append Vary User-Agent
  135 +#RewriteEngine On
  136 +#AddEncoding gzip .gz
  137 +#RewriteCond %{HTTP:Accept-encoding} gzip
  138 +#RewriteCond %{REQUEST_FILENAME}.gz -f
  139 +#RewriteRule ^(.*)$ $1.gz [QSA,L]
  140 +#</IfModule>
  141 +# Cache-Control
  142 +#<ifModule mod_headers.c>
  143 +## 30 дней
  144 +#<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
  145 +#Header set Cache-Control "max-age=2592000, public"
  146 +#</filesMatch>
  147 +## 30 дней
  148 +#<filesMatch "\.(css|js)$">
  149 +#Header set Cache-Control "max-age=2592000, public"
  150 +#</filesMatch>
  151 +## 2 дня
  152 +#<filesMatch "\.(xml|txt)$">
  153 +#Header set Cache-Control "max-age=172800, public, must-revalidate"
  154 +#</filesMatch>
  155 +## 1 день
  156 +#<filesMatch "\.(html|htm|php)$">
  157 +#Header set Cache-Control "max-age=172800, private, must-revalidate"
  158 +#</filesMatch>
  159 +#</ifModule>
  160 +
  161 +#Запрет отдачи HTTP-заголовков Vary браузерам семейства MSIE
  162 +<IfModule mod_setenvif.c>
  163 +BrowserMatch "MSIE" force-no-vary
  164 +BrowserMatch "Mozilla/4.[0-9]{2}" force-no-vary
  165 +</IfModule>
0 166 \ No newline at end of file
... ...
LICENSE.md 0 → 100755
  1 +++ a/LICENSE.md
  1 +The Yii framework is free software. It is released under the terms of
  2 +the following BSD License.
  3 +
  4 +Copyright © 2008 by Yii Software LLC (http://www.yiisoft.com)
  5 +All rights reserved.
  6 +
  7 +Redistribution and use in source and binary forms, with or without
  8 +modification, are permitted provided that the following conditions
  9 +are met:
  10 +
  11 + * Redistributions of source code must retain the above copyright
  12 + notice, this list of conditions and the following disclaimer.
  13 + * Redistributions in binary form must reproduce the above copyright
  14 + notice, this list of conditions and the following disclaimer in
  15 + the documentation and/or other materials provided with the
  16 + distribution.
  17 + * Neither the name of Yii Software LLC nor the names of its
  18 + contributors may be used to endorse or promote products derived
  19 + from this software without specific prior written permission.
  20 +
  21 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24 +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  25 +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  26 +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  27 +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  28 +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  29 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  30 +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  31 +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  32 +POSSIBILITY OF SUCH DAMAGE.
... ...
README.md 0 → 100755
  1 +++ a/README.md
  1 +Yii 2 Advanced Project Template
  2 +===============================
  3 +
  4 +Yii 2 Advanced Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for
  5 +developing complex Web applications with multiple tiers.
  6 +
  7 +The template includes three tiers: front end, back end, and console, each of which
  8 +is a separate Yii application.
  9 +
  10 +The template is designed to work in a team development environment. It supports
  11 +deploying the application in different environments.
  12 +
  13 +Documentation is at [docs/guide/README.md](docs/guide/README.md).
  14 +
  15 +[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2-app-advanced/v/stable.png)](https://packagist.org/packages/yiisoft/yii2-app-advanced)
  16 +[![Total Downloads](https://poser.pugx.org/yiisoft/yii2-app-advanced/downloads.png)](https://packagist.org/packages/yiisoft/yii2-app-advanced)
  17 +[![Build Status](https://travis-ci.org/yiisoft/yii2-app-advanced.svg?branch=master)](https://travis-ci.org/yiisoft/yii2-app-advanced)
  18 +
  19 +DIRECTORY STRUCTURE
  20 +-------------------
  21 +
  22 +```
  23 +common
  24 + config/ contains shared configurations
  25 + mail/ contains view files for e-mails
  26 + models/ contains model classes used in both backend and frontend
  27 +console
  28 + config/ contains console configurations
  29 + controllers/ contains console controllers (commands)
  30 + migrations/ contains database migrations
  31 + models/ contains console-specific model classes
  32 + runtime/ contains files generated during runtime
  33 +backend
  34 + assets/ contains application assets such as JavaScript and CSS
  35 + config/ contains backend configurations
  36 + controllers/ contains Web controller classes
  37 + models/ contains backend-specific model classes
  38 + runtime/ contains files generated during runtime
  39 + views/ contains view files for the Web application
  40 + web/ contains the entry script and Web resources
  41 +frontend
  42 + assets/ contains application assets such as JavaScript and CSS
  43 + config/ contains frontend configurations
  44 + controllers/ contains Web controller classes
  45 + models/ contains frontend-specific model classes
  46 + runtime/ contains files generated during runtime
  47 + views/ contains view files for the Web application
  48 + web/ contains the entry script and Web resources
  49 + widgets/ contains frontend widgets
  50 +vendor/ contains dependent 3rd-party packages
  51 +environments/ contains environment-based overrides
  52 +tests contains various tests for the advanced application
  53 + codeception/ contains tests developed with Codeception PHP Testing Framework
  54 +```
... ...
Vagrantfile 0 → 100755
  1 +++ a/Vagrantfile
  1 +require 'yaml'
  2 +require 'fileutils'
  3 +
  4 +domains = {
  5 + frontend: 'y2aa-frontend.dev',
  6 + backend: 'y2aa-backend.dev'
  7 +}
  8 +
  9 +config = {
  10 + local: './vagrant/config/vagrant-local.yml',
  11 + example: './vagrant/config/vagrant-local.example.yml'
  12 +}
  13 +
  14 +# copy config from example if local config not exists
  15 +FileUtils.cp config[:example], config[:local] unless File.exist?(config[:local])
  16 +# read config
  17 +options = YAML.load_file config[:local]
  18 +
  19 +# check github token
  20 +if options['github_token'].nil? || options['github_token'].to_s.length != 40
  21 + puts "You must place REAL GitHub token into configuration:\n/yii2-app-advancded/vagrant/config/vagrant-local.yml"
  22 + exit
  23 +end
  24 +
  25 +# vagrant configurate
  26 +Vagrant.configure(2) do |config|
  27 + # select the box
  28 + config.vm.box = 'ubuntu/trusty64'
  29 +
  30 + # should we ask about box updates?
  31 + config.vm.box_check_update = options['box_check_update']
  32 +
  33 + config.vm.provider 'virtualbox' do |vb|
  34 + # machine cpus count
  35 + vb.cpus = options['cpus']
  36 + # machine memory size
  37 + vb.memory = options['memory']
  38 + # machine name (for VirtualBox UI)
  39 + vb.name = options['machine_name']
  40 + end
  41 +
  42 + # machine name (for vagrant console)
  43 + config.vm.define options['machine_name']
  44 +
  45 + # machine name (for guest machine console)
  46 + config.vm.hostname = options['machine_name']
  47 +
  48 + # network settings
  49 + config.vm.network 'private_network', ip: options['ip']
  50 +
  51 + # sync: folder 'yii2-app-advanced' (host machine) -> folder '/app' (guest machine)
  52 + config.vm.synced_folder './', '/app', owner: 'vagrant', group: 'vagrant'
  53 +
  54 + # disable folder '/vagrant' (guest machine)
  55 + config.vm.synced_folder '.', '/vagrant', disabled: true
  56 +
  57 + # hosts settings (host machine)
  58 + config.vm.provision :hostmanager
  59 + config.hostmanager.enabled = true
  60 + config.hostmanager.manage_host = true
  61 + config.hostmanager.ignore_private_ip = false
  62 + config.hostmanager.include_offline = true
  63 + config.hostmanager.aliases = domains.values
  64 +
  65 + # provisioners
  66 + config.vm.provision 'shell', path: './vagrant/provision/once-as-root.sh', args: [options['timezone']]
  67 + config.vm.provision 'shell', path: './vagrant/provision/once-as-vagrant.sh', args: [options['github_token']], privileged: false
  68 + config.vm.provision 'shell', path: './vagrant/provision/always-as-root.sh', run: 'always'
  69 +
  70 + # post-install message (vagrant console)
  71 + config.vm.post_up_message = "Frontend URL: http://#{domains[:frontend]}\nBackend URL: http://#{domains[:backend]}"
  72 +end
... ...
backend/assets/AppAsset.php 0 → 100755
  1 +++ a/backend/assets/AppAsset.php
  1 +<?php
  2 +
  3 +namespace backend\assets;
  4 +
  5 +use yii\web\AssetBundle;
  6 +
  7 +/**
  8 + * Main backend application asset bundle.
  9 + */
  10 +class AppAsset extends AssetBundle
  11 +{
  12 + public $basePath = '@webroot';
  13 + public $baseUrl = '@web';
  14 + public $css = [
  15 + 'css/site.css',
  16 + ];
  17 + public $js = [
  18 + ];
  19 + public $depends = [
  20 + 'yii\web\YiiAsset',
  21 + 'yii\bootstrap\BootstrapAsset',
  22 + ];
  23 +}
... ...
backend/config/.gitignore 0 → 100755
  1 +++ a/backend/config/.gitignore
  1 +main-local.php
  2 +params-local.php
0 3 \ No newline at end of file
... ...
backend/config/bootstrap.php 0 → 100755
  1 +++ a/backend/config/bootstrap.php
  1 +<?php
... ...
backend/config/main.php 0 → 100755
  1 +++ a/backend/config/main.php
  1 +<?php
  2 +$params = array_merge(
  3 + require(__DIR__ . '/../../common/config/params.php'),
  4 + require(__DIR__ . '/../../common/config/params-local.php'),
  5 + require(__DIR__ . '/params.php'),
  6 + require(__DIR__ . '/params-local.php')
  7 +);
  8 +
  9 +return [
  10 + 'id' => 'app-backend',
  11 + 'basePath' => dirname(__DIR__),
  12 + 'controllerNamespace' => 'backend\controllers',
  13 + 'bootstrap' => ['log'],
  14 + 'modules' => [],
  15 + 'components' => [
  16 + 'user' => [
  17 + 'identityClass' => 'common\models\User',
  18 + 'enableAutoLogin' => true,
  19 + ],
  20 + 'log' => [
  21 + 'traceLevel' => YII_DEBUG ? 3 : 0,
  22 + 'targets' => [
  23 + [
  24 + 'class' => 'yii\log\FileTarget',
  25 + 'levels' => ['error', 'warning'],
  26 + ],
  27 + ],
  28 + ],
  29 + 'errorHandler' => [
  30 + 'errorAction' => 'site/error',
  31 + ],
  32 + /*
  33 + 'urlManager' => [
  34 + 'enablePrettyUrl' => true,
  35 + 'showScriptName' => false,
  36 + 'rules' => [
  37 + ],
  38 + ],
  39 + */
  40 + ],
  41 + 'params' => $params,
  42 +];
... ...
backend/config/params.php 0 → 100755
  1 +++ a/backend/config/params.php
  1 +<?php
  2 +return [
  3 + 'adminEmail' => 'admin@example.com',
  4 +];
... ...
backend/controllers/SiteController.php 0 → 100755
  1 +++ a/backend/controllers/SiteController.php
  1 +<?php
  2 +namespace backend\controllers;
  3 +
  4 +use Yii;
  5 +use yii\web\Controller;
  6 +use yii\filters\VerbFilter;
  7 +use yii\filters\AccessControl;
  8 +use common\models\LoginForm;
  9 +
  10 +/**
  11 + * Site controller
  12 + */
  13 +class SiteController extends Controller
  14 +{
  15 + /**
  16 + * @inheritdoc
  17 + */
  18 + public function behaviors()
  19 + {
  20 + return [
  21 + 'access' => [
  22 + 'class' => AccessControl::className(),
  23 + 'rules' => [
  24 + [
  25 + 'actions' => ['login', 'error'],
  26 + 'allow' => true,
  27 + ],
  28 + [
  29 + 'actions' => ['logout', 'index'],
  30 + 'allow' => true,
  31 + 'roles' => ['@'],
  32 + ],
  33 + ],
  34 + ],
  35 + 'verbs' => [
  36 + 'class' => VerbFilter::className(),
  37 + 'actions' => [
  38 + 'logout' => ['post'],
  39 + ],
  40 + ],
  41 + ];
  42 + }
  43 +
  44 + /**
  45 + * @inheritdoc
  46 + */
  47 + public function actions()
  48 + {
  49 + return [
  50 + 'error' => [
  51 + 'class' => 'yii\web\ErrorAction',
  52 + ],
  53 + ];
  54 + }
  55 +
  56 + public function actionIndex()
  57 + {
  58 + return $this->render('index');
  59 + }
  60 +
  61 + public function actionLogin()
  62 + {
  63 + if (!Yii::$app->user->isGuest) {
  64 + return $this->goHome();
  65 + }
  66 +
  67 + $model = new LoginForm();
  68 + if ($model->load(Yii::$app->request->post()) && $model->login()) {
  69 + return $this->goBack();
  70 + } else {
  71 + return $this->render('login', [
  72 + 'model' => $model,
  73 + ]);
  74 + }
  75 + }
  76 +
  77 + public function actionLogout()
  78 + {
  79 + Yii::$app->user->logout();
  80 +
  81 + return $this->goHome();
  82 + }
  83 +}
... ...
backend/models/.gitkeep 0 → 100755
  1 +++ a/backend/models/.gitkeep
  1 +*
... ...
backend/runtime/.gitignore 0 → 100755
  1 +++ a/backend/runtime/.gitignore
  1 +*
  2 +!.gitignore
0 3 \ No newline at end of file
... ...
backend/views/layouts/main.php 0 → 100755
  1 +++ a/backend/views/layouts/main.php
  1 +<?php
  2 +
  3 +/* @var $this \yii\web\View */
  4 +/* @var $content string */
  5 +
  6 +use backend\assets\AppAsset;
  7 +use yii\helpers\Html;
  8 +use yii\bootstrap\Nav;
  9 +use yii\bootstrap\NavBar;
  10 +use yii\widgets\Breadcrumbs;
  11 +use common\widgets\Alert;
  12 +
  13 +AppAsset::register($this);
  14 +?>
  15 +<?php $this->beginPage() ?>
  16 +<!DOCTYPE html>
  17 +<html lang="<?= Yii::$app->language ?>">
  18 +<head>
  19 + <meta charset="<?= Yii::$app->charset ?>">
  20 + <meta name="viewport" content="width=device-width, initial-scale=1">
  21 + <?= Html::csrfMetaTags() ?>
  22 + <title><?= Html::encode($this->title) ?></title>
  23 + <?php $this->head() ?>
  24 +</head>
  25 +<body>
  26 +<?php $this->beginBody() ?>
  27 +
  28 +<div class="wrap">
  29 + <?php
  30 + NavBar::begin([
  31 + 'brandLabel' => 'My Company',
  32 + 'brandUrl' => Yii::$app->homeUrl,
  33 + 'options' => [
  34 + 'class' => 'navbar-inverse navbar-fixed-top',
  35 + ],
  36 + ]);
  37 + $menuItems = [
  38 + ['label' => 'Home', 'url' => ['/site/index']],
  39 + ];
  40 + if (Yii::$app->user->isGuest) {
  41 + $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
  42 + } else {
  43 + $menuItems[] = '<li>'
  44 + . Html::beginForm(['/site/logout'], 'post')
  45 + . Html::submitButton(
  46 + 'Logout (' . Yii::$app->user->identity->username . ')',
  47 + ['class' => 'btn btn-link']
  48 + )
  49 + . Html::endForm()
  50 + . '</li>';
  51 + }
  52 + echo Nav::widget([
  53 + 'options' => ['class' => 'navbar-nav navbar-right'],
  54 + 'items' => $menuItems,
  55 + ]);
  56 + NavBar::end();
  57 + ?>
  58 +
  59 + <div class="container">
  60 + <?= Breadcrumbs::widget([
  61 + 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
  62 + ]) ?>
  63 + <?= Alert::widget() ?>
  64 + <?= $content ?>
  65 + </div>
  66 +</div>
  67 +
  68 +<footer class="footer">
  69 + <div class="container">
  70 + <p class="pull-left">&copy; My Company <?= date('Y') ?></p>
  71 +
  72 + <p class="pull-right"><?= Yii::powered() ?></p>
  73 + </div>
  74 +</footer>
  75 +
  76 +<?php $this->endBody() ?>
  77 +</body>
  78 +</html>
  79 +<?php $this->endPage() ?>
... ...
backend/views/site/error.php 0 → 100755
  1 +++ a/backend/views/site/error.php
  1 +<?php
  2 +
  3 +/* @var $this yii\web\View */
  4 +/* @var $name string */
  5 +/* @var $message string */
  6 +/* @var $exception Exception */
  7 +
  8 +use yii\helpers\Html;
  9 +
  10 +$this->title = $name;
  11 +?>
  12 +<div class="site-error">
  13 +
  14 + <h1><?= Html::encode($this->title) ?></h1>
  15 +
  16 + <div class="alert alert-danger">
  17 + <?= nl2br(Html::encode($message)) ?>
  18 + </div>
  19 +
  20 + <p>
  21 + The above error occurred while the Web server was processing your request.
  22 + </p>
  23 + <p>
  24 + Please contact us if you think this is a server error. Thank you.
  25 + </p>
  26 +
  27 +</div>
... ...
backend/views/site/index.php 0 → 100755
  1 +++ a/backend/views/site/index.php
  1 +<?php
  2 +
  3 +/* @var $this yii\web\View */
  4 +
  5 +$this->title = 'My Yii Application';
  6 +?>
  7 +<div class="site-index">
  8 +
  9 + <div class="jumbotron">
  10 + <h1>Congratulations!</h1>
  11 +
  12 + <p class="lead">You have successfully created your Yii-powered application.</p>
  13 +
  14 + <p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>
  15 + </div>
  16 +
  17 + <div class="body-content">
  18 +
  19 + <div class="row">
  20 + <div class="col-lg-4">
  21 + <h2>Heading</h2>
  22 +
  23 + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
  24 + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
  25 + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
  26 + fugiat nulla pariatur.</p>
  27 +
  28 + <p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation &raquo;</a></p>
  29 + </div>
  30 + <div class="col-lg-4">
  31 + <h2>Heading</h2>
  32 +
  33 + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
  34 + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
  35 + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
  36 + fugiat nulla pariatur.</p>
  37 +
  38 + <p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum &raquo;</a></p>
  39 + </div>
  40 + <div class="col-lg-4">
  41 + <h2>Heading</h2>
  42 +
  43 + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
  44 + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
  45 + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
  46 + fugiat nulla pariatur.</p>
  47 +
  48 + <p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions &raquo;</a></p>
  49 + </div>
  50 + </div>
  51 +
  52 + </div>
  53 +</div>
... ...
backend/views/site/login.php 0 → 100755
  1 +++ a/backend/views/site/login.php
  1 +<?php
  2 +
  3 +/* @var $this yii\web\View */
  4 +/* @var $form yii\bootstrap\ActiveForm */
  5 +/* @var $model \common\models\LoginForm */
  6 +
  7 +use yii\helpers\Html;
  8 +use yii\bootstrap\ActiveForm;
  9 +
  10 +$this->title = 'Login';
  11 +$this->params['breadcrumbs'][] = $this->title;
  12 +?>
  13 +<div class="site-login">
  14 + <h1><?= Html::encode($this->title) ?></h1>
  15 +
  16 + <p>Please fill out the following fields to login:</p>
  17 +
  18 + <div class="row">
  19 + <div class="col-lg-5">
  20 + <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
  21 +
  22 + <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
  23 +
  24 + <?= $form->field($model, 'password')->passwordInput() ?>
  25 +
  26 + <?= $form->field($model, 'rememberMe')->checkbox() ?>
  27 +
  28 + <div class="form-group">
  29 + <?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
  30 + </div>
  31 +
  32 + <?php ActiveForm::end(); ?>
  33 + </div>
  34 + </div>
  35 +</div>
... ...
backend/web/.gitignore 0 → 100755
  1 +++ a/backend/web/.gitignore
  1 +/index.php
  2 +/index-test.php
... ...
backend/web/assets/.gitignore 0 → 100755
  1 +++ a/backend/web/assets/.gitignore
  1 +*
  2 +!.gitignore
... ...
backend/web/css/site.css 0 → 100755
  1 +++ a/backend/web/css/site.css
  1 +html,
  2 +body {
  3 + height: 100%;
  4 +}
  5 +
  6 +.wrap {
  7 + min-height: 100%;
  8 + height: auto;
  9 + margin: 0 auto -60px;
  10 + padding: 0 0 60px;
  11 +}
  12 +
  13 +.wrap > .container {
  14 + padding: 70px 15px 20px;
  15 +}
  16 +
  17 +.footer {
  18 + height: 60px;
  19 + background-color: #f5f5f5;
  20 + border-top: 1px solid #ddd;
  21 + padding-top: 20px;
  22 +}
  23 +
  24 +.jumbotron {
  25 + text-align: center;
  26 + background-color: transparent;
  27 +}
  28 +
  29 +.jumbotron .btn {
  30 + font-size: 21px;
  31 + padding: 14px 24px;
  32 +}
  33 +
  34 +.not-set {
  35 + color: #c55;
  36 + font-style: italic;
  37 +}
  38 +
  39 +/* add sorting icons to gridview sort links */
  40 +a.asc:after, a.desc:after {
  41 + position: relative;
  42 + top: 1px;
  43 + display: inline-block;
  44 + font-family: 'Glyphicons Halflings';
  45 + font-style: normal;
  46 + font-weight: normal;
  47 + line-height: 1;
  48 + padding-left: 5px;
  49 +}
  50 +
  51 +a.asc:after {
  52 + content: /*"\e113"*/ "\e151";
  53 +}
  54 +
  55 +a.desc:after {
  56 + content: /*"\e114"*/ "\e152";
  57 +}
  58 +
  59 +.sort-numerical a.asc:after {
  60 + content: "\e153";
  61 +}
  62 +
  63 +.sort-numerical a.desc:after {
  64 + content: "\e154";
  65 +}
  66 +
  67 +.sort-ordinal a.asc:after {
  68 + content: "\e155";
  69 +}
  70 +
  71 +.sort-ordinal a.desc:after {
  72 + content: "\e156";
  73 +}
  74 +
  75 +.grid-view td {
  76 + white-space: nowrap;
  77 +}
  78 +
  79 +.grid-view .filters input,
  80 +.grid-view .filters select {
  81 + min-width: 50px;
  82 +}
  83 +
  84 +.hint-block {
  85 + display: block;
  86 + margin-top: 5px;
  87 + color: #999;
  88 +}
  89 +
  90 +.error-summary {
  91 + color: #a94442;
  92 + background: #fdf7f7;
  93 + border-left: 3px solid #eed3d7;
  94 + padding: 10px 20px;
  95 + margin: 0 0 15px 0;
  96 +}
  97 +
  98 +/* align the logout "link" (button in form) of the navbar */
  99 +.nav > li > form {
  100 + padding: 8px;
  101 +}
  102 +
  103 +@media(max-width:768px) {
  104 + .nav li > form {
  105 + padding: 3px;
  106 + }
  107 +}
  108 +
  109 +.nav > li > form > button:hover {
  110 + text-decoration: none;
  111 +}
... ...
backend/web/favicon.ico 0 → 100755
No preview for this file type
backend/web/robots.txt 0 → 100755
  1 +++ a/backend/web/robots.txt
  1 +User-agent: *
  2 +Disallow: /
... ...
common/config/.gitignore 0 → 100755
  1 +++ a/common/config/.gitignore
  1 +main-local.php
  2 +params-local.php
... ...
common/config/bootstrap.php 0 → 100755
  1 +++ a/common/config/bootstrap.php
  1 +<?php
  2 +Yii::setAlias('@common', dirname(__DIR__));
  3 +Yii::setAlias('@frontend', dirname(dirname(__DIR__)) . '/frontend');
  4 +Yii::setAlias('@backend', dirname(dirname(__DIR__)) . '/backend');
  5 +Yii::setAlias('@console', dirname(dirname(__DIR__)) . '/console');
... ...
common/config/main.php 0 → 100755
  1 +++ a/common/config/main.php
  1 +<?php
  2 +return [
  3 + 'timeZone' => 'Europe/Kiev',
  4 + 'language' => 'ru-RU',
  5 + 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
  6 + 'components' => [
  7 + 'i18n' => [
  8 + 'translations' => [
  9 + 'frontend' => [
  10 + 'class' => 'yii\i18n\PhpMessageSource',
  11 + 'basePath' => '@frontend/messages',
  12 + 'sourceLanguage' => 'en-US',
  13 + 'fileMap' => [
  14 + 'app' => 'app.php'
  15 + ],
  16 + ],
  17 + ],
  18 + ],
  19 + 'cache' => [
  20 + 'class' => 'yii\caching\FileCache',
  21 + ],
  22 + ],
  23 +];
... ...
common/config/params.php 0 → 100755
  1 +++ a/common/config/params.php
  1 +<?php
  2 +return [
  3 + 'adminEmail' => 'admin@example.com',
  4 + 'supportEmail' => 'support@example.com',
  5 + 'user.passwordResetTokenExpire' => 3600,
  6 +];
... ...
common/mail/layouts/html.php 0 → 100755
  1 +++ a/common/mail/layouts/html.php
  1 +<?php
  2 +use yii\helpers\Html;
  3 +
  4 +/* @var $this \yii\web\View view component instance */
  5 +/* @var $message \yii\mail\MessageInterface the message being composed */
  6 +/* @var $content string main view render result */
  7 +?>
  8 +<?php $this->beginPage() ?>
  9 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  10 +<html xmlns="http://www.w3.org/1999/xhtml">
  11 +<head>
  12 + <meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>" />
  13 + <title><?= Html::encode($this->title) ?></title>
  14 + <?php $this->head() ?>
  15 +</head>
  16 +<body>
  17 + <?php $this->beginBody() ?>
  18 + <?= $content ?>
  19 + <?php $this->endBody() ?>
  20 +</body>
  21 +</html>
  22 +<?php $this->endPage() ?>
... ...
common/mail/layouts/text.php 0 → 100755
  1 +++ a/common/mail/layouts/text.php
  1 +<?php
  2 +use yii\helpers\Html;
  3 +
  4 +/* @var $this \yii\web\View view component instance */
  5 +/* @var $message \yii\mail\MessageInterface the message being composed */
  6 +/* @var $content string main view render result */
  7 +?>
  8 +<?php $this->beginPage() ?>
  9 +<?php $this->beginBody() ?>
  10 +<?= $content ?>
  11 +<?php $this->endBody() ?>
  12 +<?php $this->endPage() ?>
... ...
common/mail/passwordResetToken-html.php 0 → 100755
  1 +++ a/common/mail/passwordResetToken-html.php
  1 +<?php
  2 +use yii\helpers\Html;
  3 +
  4 +/* @var $this yii\web\View */
  5 +/* @var $user common\models\User */
  6 +
  7 +$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]);
  8 +?>
  9 +<div class="password-reset">
  10 + <p>Hello <?= Html::encode($user->username) ?>,</p>
  11 +
  12 + <p>Follow the link below to reset your password:</p>
  13 +
  14 + <p><?= Html::a(Html::encode($resetLink), $resetLink) ?></p>
  15 +</div>
... ...
common/mail/passwordResetToken-text.php 0 → 100755
  1 +++ a/common/mail/passwordResetToken-text.php
  1 +<?php
  2 +
  3 +/* @var $this yii\web\View */
  4 +/* @var $user common\models\User */
  5 +
  6 +$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]);
  7 +?>
  8 +Hello <?= $user->username ?>,
  9 +
  10 +Follow the link below to reset your password:
  11 +
  12 +<?= $resetLink ?>
... ...
common/models/FlowIntensity.php 0 → 100644
  1 +++ a/common/models/FlowIntensity.php
  1 +<?php
  2 +
  3 + namespace common\models;
  4 +
  5 + use Yii;
  6 + use yii\behaviors\TimestampBehavior;
  7 +
  8 + /**
  9 + * This is the model class for table "flow_intensity".
  10 + * @property integer $flow_intensity_id
  11 + * @property integer $road_id
  12 + * @property integer $region_id
  13 + * @property double $location
  14 + * @property double $begin
  15 + * @property double $end
  16 + * @property integer $road_direction_id
  17 + * @property integer $settlement_id
  18 + * @property integer $intensity_total
  19 + * @property integer $intensity_increase
  20 + * @property integer $intensity_moto
  21 + * @property integer $intensity_moto_sidecar
  22 + * @property integer $intensity_car
  23 + * @property integer $intensity_truck_two
  24 + * @property integer $intensity_truck_two_six
  25 + * @property integer $intensity_truck_six_eight
  26 + * @property integer $intensity_truck_eight_fourteen
  27 + * @property integer $intensity_truck_fourteen
  28 + * @property integer $intensity_lorry_twelve
  29 + * @property integer $intensity_lorry_twelve_twenty
  30 + * @property integer $intensity_lorry_twenty_thirty
  31 + * @property integer $intensity_lorry_thirty
  32 + * @property integer $intensity_tractor_under_ten
  33 + * @property integer $intensity_tractor_over_ten
  34 + * @property integer $intensity_bus
  35 + * @property integer $intensity_bus_coupled
  36 + * @property integer $date_add
  37 + * @property Region $region
  38 + * @property Road $road
  39 + * @property RoadDirection $roadDirection
  40 + * @property Settlement $settlement
  41 + */
  42 + class FlowIntensity extends \yii\db\ActiveRecord
  43 + {
  44 +
  45 + /**
  46 + * @inheritdoc
  47 + */
  48 + public static function tableName()
  49 + {
  50 + return 'flow_intensity';
  51 + }
  52 +
  53 + /**
  54 + * @inheritdoc
  55 + */
  56 + public function behaviors()
  57 + {
  58 + return [
  59 + [
  60 + 'class' => TimestampBehavior::className(),
  61 + 'createdAtAttribute' => 'date_add',
  62 + 'updatedAtAttribute' => false,
  63 + ],
  64 + ];
  65 + }
  66 +
  67 + /**
  68 + * @inheritdoc
  69 + */
  70 + public function rules()
  71 + {
  72 + return [
  73 + [
  74 + [
  75 + 'road_id',
  76 + 'region_id',
  77 + 'road_direction_id',
  78 + 'settlement_id',
  79 + 'intensity_total',
  80 + 'intensity_increase',
  81 + 'intensity_moto',
  82 + 'intensity_moto_sidecar',
  83 + 'intensity_car',
  84 + 'intensity_truck_two',
  85 + 'intensity_truck_two_six',
  86 + 'intensity_truck_six_eight',
  87 + 'intensity_truck_eight_fourteen',
  88 + 'intensity_truck_fourteen',
  89 + 'intensity_lorry_twelve',
  90 + 'intensity_lorry_twelve_twenty',
  91 + 'intensity_lorry_twenty_thirty',
  92 + 'intensity_lorry_thirty',
  93 + 'intensity_tractor_under_ten',
  94 + 'intensity_tractor_over_ten',
  95 + 'intensity_bus',
  96 + 'intensity_bus_coupled',
  97 + ],
  98 + 'integer',
  99 + ],
  100 + [
  101 + [
  102 + 'location',
  103 + 'begin',
  104 + 'end',
  105 + ],
  106 + 'number',
  107 + ],
  108 + [
  109 + [ 'region_id' ],
  110 + 'exist',
  111 + 'skipOnError' => true,
  112 + 'targetClass' => Region::className(),
  113 + 'targetAttribute' => [ 'region_id' => 'region_id' ],
  114 + ],
  115 + [
  116 + [ 'road_id' ],
  117 + 'exist',
  118 + 'skipOnError' => true,
  119 + 'targetClass' => Road::className(),
  120 + 'targetAttribute' => [ 'road_id' => 'road_id' ],
  121 + ],
  122 + [
  123 + [ 'road_direction_id' ],
  124 + 'exist',
  125 + 'skipOnError' => true,
  126 + 'targetClass' => RoadDirection::className(),
  127 + 'targetAttribute' => [ 'road_direction_id' => 'road_direction_id' ],
  128 + ],
  129 + [
  130 + [ 'settlement_id' ],
  131 + 'exist',
  132 + 'skipOnError' => true,
  133 + 'targetClass' => Settlement::className(),
  134 + 'targetAttribute' => [ 'settlement_id' => 'settlement_id' ],
  135 + ],
  136 + ];
  137 + }
  138 +
  139 + /**
  140 + * @inheritdoc
  141 + */
  142 + public function attributeLabels()
  143 + {
  144 + return [
  145 + 'flow_intensity_id' => 'Індекс',
  146 + 'road_id' => 'Автомобільна дорога',
  147 + 'region_id' => 'Область',
  148 + 'location' => 'Місцезнаходження, км+',
  149 + 'begin' => 'Місцезнаходження ділянки з однорідною інтенсивністю руху, км+, початок',
  150 + 'end' => 'Місцезнаходження ділянки з однорідною інтенсивністю руху, км+, кінець',
  151 + 'road_direction_id' => 'Напрямок смуги руху',
  152 + 'settlement_id' => 'Найближчий населений пункт',
  153 + 'intensity_total' => 'Інтенсивність руху, авт/добу, всього',
  154 + 'intensity_increase' => 'Інтенсивність руху, авт/добу, приріст',
  155 + 'intensity_moto' => 'Інтенсивність руху, авт/добу, мотоцикл без коляски та мопед',
  156 + 'intensity_moto_sidecar' => 'Інтенсивність руху, авт/добу, мотоцикл з коляскою',
  157 + 'intensity_car' => 'Інтенсивність руху, авт/добу, легковий автомобіль',
  158 + 'intensity_truck_two' => 'Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: до 2 т.',
  159 + 'intensity_truck_two_six' => 'Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: від 2 т. до 6 т.',
  160 + 'intensity_truck_six_eight' => 'Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: від 6 т. до 8 т.',
  161 + 'intensity_truck_eight_fourteen' => 'Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: від 8 т. до 14 т.',
  162 + 'intensity_truck_fourteen' => 'Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: понад 14 т.',
  163 + 'intensity_lorry_twelve' => 'Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: до 12 т.',
  164 + 'intensity_lorry_twelve_twenty' => 'Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: від 12 т. до 20 т.',
  165 + 'intensity_lorry_twenty_thirty' => 'Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: від 20 т. до 30 т.',
  166 + 'intensity_lorry_thirty' => 'Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: понад 30 т.',
  167 + 'intensity_tractor_under_ten' => 'Інтенсивність руху, авт/добу, колісний трактор з причепами до 10 т.',
  168 + 'intensity_tractor_over_ten' => 'Інтенсивність руху, авт/добу, колісний трактор з причепами понад 10 т.',
  169 + 'intensity_bus' => 'Інтенсивність руху, авт/добу, автобус, тролейбус',
  170 + 'intensity_bus_coupled' => 'Інтенсивність руху, авт/добу, автобус зчеплений (здвоєний)',
  171 + 'date_add' => 'Дата визначення',
  172 + ];
  173 + }
  174 +
  175 + /**
  176 + * @return \yii\db\ActiveQuery
  177 + */
  178 + public function getRegion()
  179 + {
  180 + return $this->hasOne(Region::className(), [ 'region_id' => 'region_id' ])
  181 + ->inverseOf('flowIntensities');
  182 + }
  183 +
  184 + /**
  185 + * @return \yii\db\ActiveQuery
  186 + */
  187 + public function getRoad()
  188 + {
  189 + return $this->hasOne(Road::className(), [ 'road_id' => 'road_id' ])
  190 + ->inverseOf('flowIntensities');
  191 + }
  192 +
  193 + /**
  194 + * @return \yii\db\ActiveQuery
  195 + */
  196 + public function getRoadDirection()
  197 + {
  198 + return $this->hasOne(RoadDirection::className(), [ 'road_direction_id' => 'road_direction_id' ])
  199 + ->inverseOf('flowIntensities');
  200 + }
  201 +
  202 + /**
  203 + * @return \yii\db\ActiveQuery
  204 + */
  205 + public function getSettlement()
  206 + {
  207 + return $this->hasOne(Settlement::className(), [ 'settlement_id' => 'settlement_id' ])
  208 + ->inverseOf('flowIntensities');
  209 + }
  210 +
  211 + public function getLocationString()
  212 + {
  213 + return floor($this->location) . '+' . ( str_pad(round(( $this->location - floor($this->location) ) * 1000), 3, '0', STR_PAD_LEFT) );
  214 + }
  215 +
  216 + public function getBeginString()
  217 + {
  218 + return floor($this->begin) . '+' . ( str_pad(round(( $this->begin - floor($this->begin) ) * 1000), 3, '0', STR_PAD_LEFT) );
  219 + }
  220 +
  221 + public function getEndString()
  222 + {
  223 + return floor($this->end) . '+' . ( str_pad(round(( $this->end - floor($this->end) ) * 1000), 3, '0', STR_PAD_LEFT) );
  224 + }
  225 + }
... ...
common/models/FlowIntensitySearch.php 0 → 100644
  1 +++ a/common/models/FlowIntensitySearch.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +use yii\base\Model;
  7 +use yii\data\ActiveDataProvider;
  8 +use common\models\FlowIntensity;
  9 +
  10 +/**
  11 + * FlowIntensitySearch represents the model behind the search form about `common\models\FlowIntensity`.
  12 + */
  13 +class FlowIntensitySearch extends FlowIntensity
  14 +{
  15 + /**
  16 + * @inheritdoc
  17 + */
  18 + public function rules()
  19 + {
  20 + return [
  21 + [['flow_intensity_id', 'road_id', 'region_id', 'road_direction_id', 'settlement_id', 'intensity_total', 'intensity_increase', 'intensity_moto', 'intensity_moto_sidecar', 'intensity_car', 'intensity_truck_two', 'intensity_truck_two_six', 'intensity_truck_six_eight', 'intensity_truck_eight_fourteen', 'intensity_truck_fourteen', 'intensity_lorry_twelve', 'intensity_lorry_twelve_twenty', 'intensity_lorry_twenty_thirty', 'intensity_lorry_thirty', 'intensity_tractor_under_ten', 'intensity_tractor_over_ten', 'intensity_bus', 'intensity_bus_coupled', 'date_add'], 'integer'],
  22 + [['location', 'begin', 'end'], 'number'],
  23 + ];
  24 + }
  25 +
  26 + /**
  27 + * @inheritdoc
  28 + */
  29 + public function scenarios()
  30 + {
  31 + // bypass scenarios() implementation in the parent class
  32 + return Model::scenarios();
  33 + }
  34 +
  35 + /**
  36 + * Creates data provider instance with search query applied
  37 + *
  38 + * @param array $params
  39 + *
  40 + * @return ActiveDataProvider
  41 + */
  42 + public function search($params)
  43 + {
  44 + $query = FlowIntensity::find();
  45 +
  46 + // add conditions that should always apply here
  47 +
  48 + $dataProvider = new ActiveDataProvider([
  49 + 'query' => $query,
  50 + ]);
  51 +
  52 + $this->load($params);
  53 +
  54 + if (!$this->validate()) {
  55 + // uncomment the following line if you do not want to return any records when validation fails
  56 + // $query->where('0=1');
  57 + return $dataProvider;
  58 + }
  59 +
  60 + // grid filtering conditions
  61 + $query->andFilterWhere([
  62 + 'flow_intensity_id' => $this->flow_intensity_id,
  63 + 'road_id' => $this->road_id,
  64 + 'region_id' => $this->region_id,
  65 + 'location' => $this->location,
  66 + 'begin' => $this->begin,
  67 + 'end' => $this->end,
  68 + 'road_direction_id' => $this->road_direction_id,
  69 + 'settlement_id' => $this->settlement_id,
  70 + 'intensity_total' => $this->intensity_total,
  71 + 'intensity_increase' => $this->intensity_increase,
  72 + 'intensity_moto' => $this->intensity_moto,
  73 + 'intensity_moto_sidecar' => $this->intensity_moto_sidecar,
  74 + 'intensity_car' => $this->intensity_car,
  75 + 'intensity_truck_two' => $this->intensity_truck_two,
  76 + 'intensity_truck_two_six' => $this->intensity_truck_two_six,
  77 + 'intensity_truck_six_eight' => $this->intensity_truck_six_eight,
  78 + 'intensity_truck_eight_fourteen' => $this->intensity_truck_eight_fourteen,
  79 + 'intensity_truck_fourteen' => $this->intensity_truck_fourteen,
  80 + 'intensity_lorry_twelve' => $this->intensity_lorry_twelve,
  81 + 'intensity_lorry_twelve_twenty' => $this->intensity_lorry_twelve_twenty,
  82 + 'intensity_lorry_twenty_thirty' => $this->intensity_lorry_twenty_thirty,
  83 + 'intensity_lorry_thirty' => $this->intensity_lorry_thirty,
  84 + 'intensity_tractor_under_ten' => $this->intensity_tractor_under_ten,
  85 + 'intensity_tractor_over_ten' => $this->intensity_tractor_over_ten,
  86 + 'intensity_bus' => $this->intensity_bus,
  87 + 'intensity_bus_coupled' => $this->intensity_bus_coupled,
  88 + 'date_add' => $this->date_add,
  89 + ]);
  90 +
  91 + return $dataProvider;
  92 + }
  93 +}
... ...
common/models/GoogleRoad.php 0 → 100644
  1 +++ a/common/models/GoogleRoad.php
  1 +<?php
  2 + namespace common\models;
  3 +
  4 + /**
  5 + * Наработка
  6 + * Class GoogleRoad
  7 + * @package common\models
  8 + */
  9 + class GoogleRoad
  10 + {
  11 +
  12 + protected $path;
  13 +
  14 + protected $interpolate = false;
  15 +
  16 + protected $key = 'AIzaSyCaeB8Lppsl-JqjsGWVHxxMQ3WqU8vGlOQ';
  17 +
  18 + public function __construct(string $path)
  19 + {
  20 + $this->path = $path;
  21 + }
  22 +
  23 + public function execute()
  24 + {
  25 + $ch = curl_init();
  26 + curl_setopt($ch, CURLOPT_URL, "https://roads.googleapis.com/v1/snapToRoads?path=".$this->path."&interpolate=true&key=AIzaSyCaeB8Lppsl-JqjsGWVHxxMQ3WqU8vGlOQ");
  27 + curl_setopt($ch, CURLOPT_HEADER, 0);
  28 + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  29 + $result = curl_exec($ch);
  30 + curl_close($ch);
  31 + return $result;
  32 + }
  33 + }
0 34 \ No newline at end of file
... ...
common/models/LoginForm.php 0 → 100755
  1 +++ a/common/models/LoginForm.php
  1 +<?php
  2 +namespace common\models;
  3 +
  4 +use Yii;
  5 +use yii\base\Model;
  6 +
  7 +/**
  8 + * Login form
  9 + */
  10 +class LoginForm extends Model
  11 +{
  12 + public $username;
  13 + public $password;
  14 + public $rememberMe = true;
  15 +
  16 + private $_user;
  17 +
  18 +
  19 + /**
  20 + * @inheritdoc
  21 + */
  22 + public function rules()
  23 + {
  24 + return [
  25 + // username and password are both required
  26 + [['username', 'password'], 'required'],
  27 + // rememberMe must be a boolean value
  28 + ['rememberMe', 'boolean'],
  29 + // password is validated by validatePassword()
  30 + ['password', 'validatePassword'],
  31 + ];
  32 + }
  33 +
  34 + /**
  35 + * Validates the password.
  36 + * This method serves as the inline validation for password.
  37 + *
  38 + * @param string $attribute the attribute currently being validated
  39 + * @param array $params the additional name-value pairs given in the rule
  40 + */
  41 + public function validatePassword($attribute, $params)
  42 + {
  43 + if (!$this->hasErrors()) {
  44 + $user = $this->getUser();
  45 + if (!$user || !$user->validatePassword($this->password)) {
  46 + $this->addError($attribute, 'Incorrect username or password.');
  47 + }
  48 + }
  49 + }
  50 +
  51 + /**
  52 + * Logs in a user using the provided username and password.
  53 + *
  54 + * @return boolean whether the user is logged in successfully
  55 + */
  56 + public function login()
  57 + {
  58 + if ($this->validate()) {
  59 + return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
  60 + } else {
  61 + return false;
  62 + }
  63 + }
  64 +
  65 + /**
  66 + * Finds user by [[username]]
  67 + *
  68 + * @return User|null
  69 + */
  70 + protected function getUser()
  71 + {
  72 + if ($this->_user === null) {
  73 + $this->_user = User::findByUsername($this->username);
  74 + }
  75 +
  76 + return $this->_user;
  77 + }
  78 +}
... ...
common/models/Organization.php 0 → 100644
  1 +++ a/common/models/Organization.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "organization".
  9 + *
  10 + * @property integer $organization_id
  11 + * @property string $name
  12 + * @property integer $date_add
  13 + *
  14 + * @property RoadService[] $roadServices
  15 + */
  16 +class Organization extends \yii\db\ActiveRecord
  17 +{
  18 + /**
  19 + * @inheritdoc
  20 + */
  21 + public static function tableName()
  22 + {
  23 + return 'organization';
  24 + }
  25 +
  26 + /**
  27 + * @inheritdoc
  28 + */
  29 + public function rules()
  30 + {
  31 + return [
  32 + [['name'], 'required'],
  33 + [['date_add'], 'integer'],
  34 + [['name'], 'string', 'max' => 255],
  35 + ];
  36 + }
  37 +
  38 + /**
  39 + * @inheritdoc
  40 + */
  41 + public function attributeLabels()
  42 + {
  43 + return [
  44 + 'organization_id' => 'Organization ID',
  45 + 'name' => 'Name',
  46 + 'date_add' => 'Date Add',
  47 + ];
  48 + }
  49 +
  50 + /**
  51 + * @return \yii\db\ActiveQuery
  52 + */
  53 + public function getRoadServices()
  54 + {
  55 + return $this->hasMany(RoadService::className(), ['organization_id' => 'organization_id'])->inverseOf('organization');
  56 + }
  57 +}
... ...
common/models/Point.php 0 → 100644
  1 +++ a/common/models/Point.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "point".
  9 + *
  10 + * @property integer $point_id
  11 + * @property integer $road_passport_id
  12 + * @property string $lat
  13 + * @property string $lng
  14 + * @property string $km
  15 + * @property integer $num
  16 + *
  17 + * @property RoadPassport $roadPassport
  18 + */
  19 +class Point extends \yii\db\ActiveRecord
  20 +{
  21 + /**
  22 + * @inheritdoc
  23 + */
  24 + public static function tableName()
  25 + {
  26 + return 'point';
  27 + }
  28 +
  29 + /**
  30 + * @inheritdoc
  31 + */
  32 + public function rules()
  33 + {
  34 + return [
  35 + [['road_passport_id', 'num'], 'integer'],
  36 + [['lat', 'lng', 'km'], 'number'],
  37 + [['road_passport_id'], 'exist', 'skipOnError' => true, 'targetClass' => RoadPassport::className(), 'targetAttribute' => ['road_passport_id' => 'road_passport_id']],
  38 + [['km'], 'number', 'min' => $this->roadPassport->begin, 'max' => $this->roadPassport->end],
  39 + ];
  40 + }
  41 +
  42 + /**
  43 + * @inheritdoc
  44 + */
  45 + public function attributeLabels()
  46 + {
  47 + return [
  48 + 'point_id' => 'Point ID',
  49 + 'road_passport_id' => 'Road Passport ID',
  50 + 'lat' => 'Lat',
  51 + 'lng' => 'Lng',
  52 + 'km' => 'Km',
  53 + 'num' => 'Num',
  54 + ];
  55 + }
  56 +
  57 + /**
  58 + * @return \yii\db\ActiveQuery
  59 + */
  60 + public function getRoadPassport()
  61 + {
  62 + return $this->hasOne(RoadPassport::className(), ['road_passport_id' => 'road_passport_id'])->inverseOf('points');
  63 + }
  64 +}
... ...
common/models/Region.php 0 → 100644
  1 +++ a/common/models/Region.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "region".
  9 + *
  10 + * @property integer $region_id
  11 + * @property string $name
  12 + * @property integer $index
  13 + *
  14 + * @property RoadPassport[] $roadPassports
  15 + */
  16 +class Region extends \yii\db\ActiveRecord
  17 +{
  18 + /**
  19 + * @inheritdoc
  20 + */
  21 + public static function tableName()
  22 + {
  23 + return 'region';
  24 + }
  25 +
  26 + /**
  27 + * @inheritdoc
  28 + */
  29 + public function rules()
  30 + {
  31 + return [
  32 + [['index'], 'integer'],
  33 + [['name'], 'string', 'max' => 255],
  34 + ];
  35 + }
  36 +
  37 + /**
  38 + * @inheritdoc
  39 + */
  40 + public function attributeLabels()
  41 + {
  42 + return [
  43 + 'region_id' => 'Region ID',
  44 + 'name' => 'Name',
  45 + 'index' => 'Index',
  46 + ];
  47 + }
  48 +
  49 + /**
  50 + * @return \yii\db\ActiveQuery
  51 + */
  52 + public function getRoadPassports()
  53 + {
  54 + return $this->hasMany(RoadPassport::className(), ['region_id' => 'region_id'])->inverseOf('region');
  55 + }
  56 +
  57 + /**
  58 + * @return \yii\db\ActiveQuery
  59 + */
  60 + public function getRoadServices()
  61 + {
  62 + return $this->hasMany(RoadService::className(), [ 'region_id' => 'region_id' ])
  63 + ->inverseOf('region');
  64 + }
  65 +
  66 + /**
  67 + * @return \yii\db\ActiveQuery
  68 + */
  69 + public function getSettlementAddressLinks()
  70 + {
  71 + return $this->hasOne(SettlementAddressLink::className(), ['region' => 'region_id'])->inverseOf('region');
  72 + }
  73 +
  74 + /**
  75 + * @return \yii\db\ActiveQuery
  76 + */
  77 + public function getFlowIntensities()
  78 + {
  79 + return $this->hasOne(FlowIntensity::className(), [ 'region_id' => 'region_id' ])
  80 + ->inverseOf('region');
  81 + }
  82 +}
... ...
common/models/Road.php 0 → 100644
  1 +++ a/common/models/Road.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "road".
  9 + *
  10 + * @property integer $road_id
  11 + * @property string $name
  12 + * @property integer $road_type_id
  13 + * @property integer $road_category_id
  14 + * @property integer $index
  15 + *
  16 + * @property RoadCategory $roadCategory
  17 + * @property RoadType $roadType
  18 + * @property RoadPassport[] $roadPassports
  19 + */
  20 +class Road extends \yii\db\ActiveRecord
  21 +{
  22 + /**
  23 + * @inheritdoc
  24 + */
  25 + public static function tableName()
  26 + {
  27 + return 'road';
  28 + }
  29 +
  30 + /**
  31 + * @inheritdoc
  32 + */
  33 + public function rules()
  34 + {
  35 + return [
  36 + [['road_type_id', 'road_category_id', 'name', 'index'], 'required'],
  37 + [['road_type_id', 'road_category_id', 'index'], 'integer'],
  38 + [['index'], 'default', 'value' => 0],
  39 + [['name'], 'string', 'max' => 255],
  40 + [['road_type_id', 'index'], 'unique', 'skipOnError' => true, 'targetAttribute' => ['road_type_id', 'index'], 'message' => 'The combination of Road Type ID and Index has already been taken.'],
  41 + [['road_category_id'], 'exist', 'skipOnError' => true, 'targetClass' => RoadCategory::className(), 'targetAttribute' => ['road_category_id' => 'road_category_id']],
  42 + [['road_type_id'], 'exist', 'skipOnError' => true, 'targetClass' => RoadType::className(), 'targetAttribute' => ['road_type_id' => 'road_type_id']],
  43 + ];
  44 + }
  45 +
  46 + /**
  47 + * @inheritdoc
  48 + */
  49 + public function attributeLabels()
  50 + {
  51 + return [
  52 + 'road_id' => 'Road ID',
  53 + 'name' => 'Назва дороги',
  54 + 'road_type_id' => 'Тип дороги',
  55 + 'road_category_id' => 'Категорія дороги',
  56 + 'index' => 'Індекс дороги',
  57 + ];
  58 + }
  59 +
  60 + /**
  61 + * @return \yii\db\ActiveQuery
  62 + */
  63 + public function getRoadCategory()
  64 + {
  65 + return $this->hasOne(RoadCategory::className(), ['road_category_id' => 'road_category_id'])->inverseOf('roads');
  66 + }
  67 +
  68 + /**
  69 + * @return \yii\db\ActiveQuery
  70 + */
  71 + public function getRoadType()
  72 + {
  73 + return $this->hasOne(RoadType::className(), ['road_type_id' => 'road_type_id'])->inverseOf('roads');
  74 + }
  75 +
  76 + /**
  77 + * @return \yii\db\ActiveQuery
  78 + */
  79 + public function getRoadPassports()
  80 + {
  81 + return $this->hasMany(RoadPassport::className(), ['road_id' => 'road_id'])->inverseOf('road');
  82 + }
  83 +
  84 + /**
  85 + * @return \yii\db\ActiveQuery
  86 + */
  87 + public function getRoadServices()
  88 + {
  89 + return $this->hasMany(RoadService::className(), [ 'road_id' => 'road_id' ])
  90 + ->inverseOf('road');
  91 + }
  92 +
  93 + /**
  94 + * @return \yii\db\ActiveQuery
  95 + */
  96 + public function getSettlementAddressLinks()
  97 + {
  98 + return $this->hasOne(SettlementAddressLink::className(), ['road_id' => 'road_id'])->inverseOf('road');
  99 + }
  100 +
  101 + /**
  102 + * @return \yii\db\ActiveQuery
  103 + */
  104 + public function getFlowIntensities()
  105 + {
  106 + return $this->hasOne(FlowIntensity::className(), [ 'road_id' => 'road_id' ])
  107 + ->inverseOf('road');
  108 + }
  109 +}
... ...
common/models/RoadCategory.php 0 → 100644
  1 +++ a/common/models/RoadCategory.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "road_category".
  9 + *
  10 + * @property integer $road_category_id
  11 + * @property string $value
  12 + *
  13 + * @property Road[] $roads
  14 + */
  15 +class RoadCategory extends \yii\db\ActiveRecord
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public static function tableName()
  21 + {
  22 + return 'road_category';
  23 + }
  24 +
  25 + /**
  26 + * @inheritdoc
  27 + */
  28 + public function rules()
  29 + {
  30 + return [
  31 + [['value'], 'string', 'max' => 255],
  32 + ];
  33 + }
  34 +
  35 + /**
  36 + * @inheritdoc
  37 + */
  38 + public function attributeLabels()
  39 + {
  40 + return [
  41 + 'road_category_id' => 'Road Category ID',
  42 + 'value' => 'Категорія дороги',
  43 + ];
  44 + }
  45 +
  46 + /**
  47 + * @return \yii\db\ActiveQuery
  48 + */
  49 + public function getRoads()
  50 + {
  51 + return $this->hasMany(Road::className(), ['road_category_id' => 'road_category_id'])->inverseOf('roadCategory');
  52 + }
  53 +}
... ...
common/models/RoadDirection.php 0 → 100644
  1 +++ a/common/models/RoadDirection.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "road_direction".
  9 + *
  10 + * @property integer $road_direction_id
  11 + * @property string $direction_name
  12 + *
  13 + * @property RoadService[] $roadServices
  14 + */
  15 +class RoadDirection extends \yii\db\ActiveRecord
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public static function tableName()
  21 + {
  22 + return 'road_direction';
  23 + }
  24 +
  25 + /**
  26 + * @inheritdoc
  27 + */
  28 + public function rules()
  29 + {
  30 + return [
  31 + [['direction_name'], 'required'],
  32 + [['direction_name'], 'string', 'max' => 255],
  33 + ];
  34 + }
  35 +
  36 + /**
  37 + * @inheritdoc
  38 + */
  39 + public function attributeLabels()
  40 + {
  41 + return [
  42 + 'road_direction_id' => 'Road Direction ID',
  43 + 'direction_name' => 'Direction Name',
  44 + ];
  45 + }
  46 +
  47 + /**
  48 + * @return \yii\db\ActiveQuery
  49 + */
  50 + public function getRoadServices()
  51 + {
  52 + return $this->hasMany(RoadService::className(), ['road_direction_id' => 'road_direction_id'])->inverseOf('roadDirection');
  53 + }
  54 +
  55 + /**
  56 + * @return \yii\db\ActiveQuery
  57 + */
  58 + public function getFlowIntensities()
  59 + {
  60 + return $this->hasOne(FlowIntensity::className(), [ 'road_direction_id' => 'road_direction_id' ])
  61 + ->inverseOf('roadDirection');
  62 + }
  63 +}
... ...
common/models/RoadPassport.php 0 → 100644
  1 +++ a/common/models/RoadPassport.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "road_passport".
  9 + *
  10 + * @property integer $road_passport_id
  11 + * @property integer $road_id
  12 + * @property integer $region_id
  13 + * @property string $begin
  14 + * @property string $end
  15 + *
  16 + * @property Point[] $points
  17 + * @property Region $region
  18 + * @property Road $road
  19 + */
  20 +class RoadPassport extends \yii\db\ActiveRecord
  21 +{
  22 + /**
  23 + * @inheritdoc
  24 + */
  25 + public static function tableName()
  26 + {
  27 + return 'road_passport';
  28 + }
  29 +
  30 + /**
  31 + * @inheritdoc
  32 + */
  33 + public function rules()
  34 + {
  35 + return [
  36 + [['road_id', 'region_id', 'begin'], 'required'],
  37 + [['road_id', 'region_id'], 'integer'],
  38 + [['begin', 'end'], 'number'],
  39 + [['region_id'], 'exist', 'skipOnError' => true, 'targetClass' => Region::className(), 'targetAttribute' => ['region_id' => 'region_id']],
  40 + [['road_id'], 'exist', 'skipOnError' => true, 'targetClass' => Road::className(), 'targetAttribute' => ['road_id' => 'road_id']],
  41 + ];
  42 + }
  43 +
  44 + /**
  45 + * @inheritdoc
  46 + */
  47 + public function attributeLabels()
  48 + {
  49 + return [
  50 + 'road_passport_id' => 'Road Passport ID',
  51 + 'road_id' => 'Дорога',
  52 + 'region_id' => 'Область',
  53 + 'begin' => 'Початок (км+)',
  54 + 'end' => 'Кінець (км+)',
  55 + ];
  56 + }
  57 +
  58 + /**
  59 + * @return \yii\db\ActiveQuery
  60 + */
  61 + public function getPoints()
  62 + {
  63 + return $this->hasMany(Point::className(), ['road_passport_id' => 'road_passport_id'])->inverseOf('roadPassport');
  64 + }
  65 +
  66 + /**
  67 + * @return \yii\db\ActiveQuery
  68 + */
  69 + public function getRegion()
  70 + {
  71 + return $this->hasOne(Region::className(), ['region_id' => 'region_id'])->inverseOf('roadPassports');
  72 + }
  73 +
  74 + /**
  75 + * @return \yii\db\ActiveQuery
  76 + */
  77 + public function getRoad()
  78 + {
  79 + return $this->hasOne(Road::className(), ['road_id' => 'road_id'])->inverseOf('roadPassports');
  80 + }
  81 +}
... ...
common/models/RoadService.php 0 → 100644
  1 +++ a/common/models/RoadService.php
  1 +<?php
  2 +
  3 + namespace common\models;
  4 +
  5 + use Yii;
  6 +
  7 + /**
  8 + * This is the model class for table "road_service".
  9 + * @property integer $road_service_id
  10 + * @property integer $road_id
  11 + * @property integer $region_id
  12 + * @property double $begin
  13 + * @property double $end
  14 + * @property integer $road_direction_id
  15 + * @property integer $organization_id
  16 + * @property integer $year_begin
  17 + * @property Organization $organization
  18 + * @property Region $region
  19 + * @property Road $road
  20 + * @property RoadDirection $roadDirection
  21 + */
  22 + class RoadService extends \yii\db\ActiveRecord
  23 + {
  24 +
  25 + /**
  26 + * @inheritdoc
  27 + */
  28 + public static function tableName()
  29 + {
  30 + return 'road_service';
  31 + }
  32 +
  33 + /**
  34 + * @inheritdoc
  35 + */
  36 + public function rules()
  37 + {
  38 + return [
  39 + [
  40 + [
  41 + 'road_id',
  42 + 'region_id',
  43 + 'begin',
  44 + 'end',
  45 + 'organization_id',
  46 + 'year_begin',
  47 + ],
  48 + 'required',
  49 + ],
  50 + [
  51 + [
  52 + 'road_id',
  53 + 'region_id',
  54 + 'road_direction_id',
  55 + 'organization_id',
  56 + ],
  57 + 'integer',
  58 + ],
  59 + [
  60 + [
  61 + 'begin',
  62 + 'end',
  63 + ],
  64 + 'number',
  65 + ],
  66 + [
  67 + [ 'year_begin' ],
  68 + 'integer',
  69 + 'min' => 1991,
  70 + 'max' => date('Y'),
  71 + ],
  72 + [
  73 + [ 'organization_id' ],
  74 + 'exist',
  75 + 'skipOnError' => true,
  76 + 'targetClass' => Organization::className(),
  77 + 'targetAttribute' => [ 'organization_id' => 'organization_id' ],
  78 + ],
  79 + [
  80 + [ 'region_id' ],
  81 + 'exist',
  82 + 'skipOnError' => true,
  83 + 'targetClass' => Region::className(),
  84 + 'targetAttribute' => [ 'region_id' => 'region_id' ],
  85 + ],
  86 + [
  87 + [ 'road_id' ],
  88 + 'exist',
  89 + 'skipOnError' => true,
  90 + 'targetClass' => Road::className(),
  91 + 'targetAttribute' => [ 'road_id' => 'road_id' ],
  92 + ],
  93 + [
  94 + [ 'road_direction_id' ],
  95 + 'exist',
  96 + 'skipOnError' => true,
  97 + 'targetClass' => RoadDirection::className(),
  98 + 'targetAttribute' => [ 'road_direction_id' => 'road_direction_id' ],
  99 + ],
  100 + ];
  101 + }
  102 +
  103 + /**
  104 + * @inheritdoc
  105 + */
  106 + public function attributeLabels()
  107 + {
  108 + return [
  109 + 'road_service_id' => 'Індекс',
  110 + 'road_id' => 'Автомобільна дорога',
  111 + 'region_id' => 'Область',
  112 + 'begin' => 'Місцезнаходження, км+ початок',
  113 + 'end' => 'Місцезнаходження, км+ кінець',
  114 + 'road_direction_id' => 'Напрямок смуги руху',
  115 + 'organization_id' => 'Назва організації чи підприємства, що обслуговує ділянку дороги',
  116 + 'year_begin' => 'Рік початку обслуговування',
  117 + ];
  118 + }
  119 +
  120 + /**
  121 + * @return \yii\db\ActiveQuery
  122 + */
  123 + public function getOrganization()
  124 + {
  125 + return $this->hasOne(Organization::className(), [ 'organization_id' => 'organization_id' ])
  126 + ->inverseOf('roadServices');
  127 + }
  128 +
  129 + /**
  130 + * @return \yii\db\ActiveQuery
  131 + */
  132 + public function getRegion()
  133 + {
  134 + return $this->hasOne(Region::className(), [ 'region_id' => 'region_id' ])
  135 + ->inverseOf('roadServices');
  136 + }
  137 +
  138 + /**
  139 + * @return \yii\db\ActiveQuery
  140 + */
  141 + public function getRoad()
  142 + {
  143 + return $this->hasOne(Road::className(), [ 'road_id' => 'road_id' ])
  144 + ->inverseOf('roadServices');
  145 + }
  146 +
  147 + /**
  148 + * @return \yii\db\ActiveQuery
  149 + */
  150 + public function getRoadDirection()
  151 + {
  152 + return $this->hasOne(RoadDirection::className(), [ 'road_direction_id' => 'road_direction_id' ])
  153 + ->inverseOf('roadServices');
  154 + }
  155 +
  156 + public function getTitle()
  157 + {
  158 + $title = '';
  159 + $title .= $this->road->name;
  160 + $title .= ' км ' . $this->getBeginString() . ' - км ' . $this->getEndString();
  161 + return $title;
  162 + }
  163 +
  164 + public function getBeginString()
  165 + {
  166 + return floor($this->begin) . '+' . ( str_pad(( ( $this->begin - floor($this->begin) ) * 1000 ), 3, '0', STR_PAD_LEFT) );
  167 + }
  168 +
  169 + public function getEndString()
  170 + {
  171 + return floor($this->end) . '+' . ( str_pad(( ( $this->end - floor($this->end) ) * 1000 ), 3, '0', STR_PAD_LEFT) );
  172 + }
  173 + }
... ...
common/models/RoadServiceSearch.php 0 → 100644
  1 +++ a/common/models/RoadServiceSearch.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +use yii\base\Model;
  7 +use yii\data\ActiveDataProvider;
  8 +use common\models\RoadService;
  9 +
  10 +/**
  11 + * RoadServiceSearch represents the model behind the search form about `common\models\RoadService`.
  12 + */
  13 +class RoadServiceSearch extends RoadService
  14 +{
  15 + /**
  16 + * @inheritdoc
  17 + */
  18 + public function rules()
  19 + {
  20 + return [
  21 + [['road_service_id', 'road_id', 'region_id', 'road_direction_id', 'organization_id', 'year_begin'], 'integer'],
  22 + [['begin', 'end'], 'number'],
  23 + ];
  24 + }
  25 +
  26 + /**
  27 + * @inheritdoc
  28 + */
  29 + public function scenarios()
  30 + {
  31 + // bypass scenarios() implementation in the parent class
  32 + return Model::scenarios();
  33 + }
  34 +
  35 + /**
  36 + * Creates data provider instance with search query applied
  37 + *
  38 + * @param array $params
  39 + *
  40 + * @return ActiveDataProvider
  41 + */
  42 + public function search($params)
  43 + {
  44 + $query = RoadService::find()->joinWith(['road', 'region', 'organization', 'roadDirection']);
  45 +
  46 + // add conditions that should always apply here
  47 +
  48 + $dataProvider = new ActiveDataProvider([
  49 + 'query' => $query,
  50 + ]);
  51 +
  52 + $this->load($params);
  53 +
  54 + if (!$this->validate()) {
  55 + // uncomment the following line if you do not want to return any records when validation fails
  56 + // $query->where('0=1');
  57 + return $dataProvider;
  58 + }
  59 +
  60 + // grid filtering conditions
  61 + $query->andFilterWhere([
  62 + 'road_service_id' => $this->road_service_id,
  63 + 'road_id' => $this->road_id,
  64 + 'region_id' => $this->region_id,
  65 + 'begin' => $this->begin,
  66 + 'end' => $this->end,
  67 + 'road_direction_id' => $this->road_direction_id,
  68 + 'organization_id' => $this->organization_id,
  69 + 'year_begin' => $this->year_begin,
  70 + ]);
  71 +
  72 + return $dataProvider;
  73 + }
  74 +}
... ...
common/models/RoadType.php 0 → 100644
  1 +++ a/common/models/RoadType.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "road_type".
  9 + *
  10 + * @property integer $road_type_id
  11 + * @property string $value
  12 + *
  13 + * @property Road[] $roads
  14 + */
  15 +class RoadType extends \yii\db\ActiveRecord
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public static function tableName()
  21 + {
  22 + return 'road_type';
  23 + }
  24 +
  25 + /**
  26 + * @inheritdoc
  27 + */
  28 + public function rules()
  29 + {
  30 + return [
  31 + [['value'], 'string', 'max' => 255],
  32 + ];
  33 + }
  34 +
  35 + /**
  36 + * @inheritdoc
  37 + */
  38 + public function attributeLabels()
  39 + {
  40 + return [
  41 + 'road_type_id' => 'Road Type ID',
  42 + 'value' => 'Тип дороги',
  43 + ];
  44 + }
  45 +
  46 + /**
  47 + * @return \yii\db\ActiveQuery
  48 + */
  49 + public function getRoads()
  50 + {
  51 + return $this->hasMany(Road::className(), ['road_type_id' => 'road_type_id'])->inverseOf('roadType');
  52 + }
  53 +}
... ...
common/models/Settlement.php 0 → 100644
  1 +++ a/common/models/Settlement.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "settlement".
  9 + *
  10 + * @property integer $settlement_id
  11 + * @property string $name
  12 + * @property string $sign
  13 + *
  14 + * @property SettlementAddressLink[] $settlementAddressLinks
  15 + */
  16 +class Settlement extends \yii\db\ActiveRecord
  17 +{
  18 + /**
  19 + * @inheritdoc
  20 + */
  21 + public static function tableName()
  22 + {
  23 + return 'settlement';
  24 + }
  25 +
  26 + /**
  27 + * @inheritdoc
  28 + */
  29 + public function rules()
  30 + {
  31 + return [
  32 + [['name'], 'required'],
  33 + [['name', 'sign'], 'string', 'max' => 255],
  34 + ];
  35 + }
  36 +
  37 + /**
  38 + * @inheritdoc
  39 + */
  40 + public function attributeLabels()
  41 + {
  42 + return [
  43 + 'settlement_id' => 'Settlement ID',
  44 + 'name' => 'Name',
  45 + 'sign' => 'Sign',
  46 + ];
  47 + }
  48 +
  49 + /**
  50 + * @return \yii\db\ActiveQuery
  51 + */
  52 + public function getSettlementAddressLinks()
  53 + {
  54 + return $this->hasMany(SettlementAddressLink::className(), ['settlement_id' => 'settlement_id'])->inverseOf('settlement');
  55 + }
  56 +
  57 + /**
  58 + * @return \yii\db\ActiveQuery
  59 + */
  60 + public function getFlowIntensities()
  61 + {
  62 + return $this->hasOne(FlowIntensity::className(), [ 'settlement_id' => 'settlement_id' ])
  63 + ->inverseOf('settlement');
  64 + }
  65 +}
... ...
common/models/SettlementAddressLink.php 0 → 100644
  1 +++ a/common/models/SettlementAddressLink.php
  1 +<?php
  2 +
  3 + namespace common\models;
  4 +
  5 + use Yii;
  6 +
  7 + /**
  8 + * This is the model class for table "settlement_address_link".
  9 + * @property integer $settlement_address_link_id
  10 + * @property integer $road_id
  11 + * @property integer $region_id
  12 + * @property double $begin
  13 + * @property double $end
  14 + * @property integer $settlement_location_id
  15 + * @property integer $settlement_id
  16 + * @property double $distance
  17 + * @property Region $region
  18 + * @property Road $road
  19 + * @property Settlement $settlement
  20 + * @property SettlementLocation $settlementLocation
  21 + */
  22 + class SettlementAddressLink extends \yii\db\ActiveRecord
  23 + {
  24 +
  25 + /**
  26 + * @inheritdoc
  27 + */
  28 + public static function tableName()
  29 + {
  30 + return 'settlement_address_link';
  31 + }
  32 +
  33 + /**
  34 + * @inheritdoc
  35 + */
  36 + public function rules()
  37 + {
  38 + return [
  39 + [
  40 + [
  41 + 'road_id',
  42 + 'region_id',
  43 + 'begin',
  44 + 'end',
  45 + 'settlement_location_id',
  46 + 'settlement_id',
  47 + ],
  48 + 'required',
  49 + ],
  50 + [
  51 + [
  52 + 'road_id',
  53 + 'region_id',
  54 + 'settlement_location_id',
  55 + 'settlement_id',
  56 + ],
  57 + 'integer',
  58 + ],
  59 + [
  60 + [
  61 + 'begin',
  62 + 'end',
  63 + 'distance',
  64 + ],
  65 + 'number',
  66 + ],
  67 + [
  68 + [ 'distance' ],
  69 + 'default',
  70 + 'value' => 0,
  71 + ],
  72 + [
  73 + [ 'region_id' ],
  74 + 'exist',
  75 + 'skipOnError' => true,
  76 + 'targetClass' => Region::className(),
  77 + 'targetAttribute' => [ 'region_id' => 'region_id' ],
  78 + ],
  79 + [
  80 + [ 'road_id' ],
  81 + 'exist',
  82 + 'skipOnError' => true,
  83 + 'targetClass' => Road::className(),
  84 + 'targetAttribute' => [ 'road_id' => 'road_id' ],
  85 + ],
  86 + [
  87 + [ 'settlement_id' ],
  88 + 'exist',
  89 + 'skipOnError' => true,
  90 + 'targetClass' => Settlement::className(),
  91 + 'targetAttribute' => [ 'settlement_id' => 'settlement_id' ],
  92 + ],
  93 + [
  94 + [ 'settlement_location_id' ],
  95 + 'exist',
  96 + 'skipOnError' => true,
  97 + 'targetClass' => SettlementLocation::className(),
  98 + 'targetAttribute' => [ 'settlement_location_id' => 'settlement_location_id' ],
  99 + ],
  100 + ];
  101 + }
  102 +
  103 + /**
  104 + * @inheritdoc
  105 + */
  106 + public function attributeLabels()
  107 + {
  108 + return [
  109 + 'settlement_address_link_id' => 'Індекс',
  110 + 'road_id' => 'Автомобільна дорога',
  111 + 'region_id' => 'Область',
  112 + 'begin' => 'Місцезнаходження, км+ початок',
  113 + 'end' => 'Місцезнаходження, км+ кінець',
  114 + 'settlement_location_id' => 'Місце',
  115 + 'settlement_id' => 'Назва населенного пункту',
  116 + 'distance' => 'Відстань від проїзної частини до забудови, м',
  117 + ];
  118 + }
  119 +
  120 + /**
  121 + * @return \yii\db\ActiveQuery
  122 + */
  123 + public function getRegion()
  124 + {
  125 + return $this->hasOne(Region::className(), [ 'region_id' => 'region_id' ])
  126 + ->inverseOf('settlementAddressLinks');
  127 + }
  128 +
  129 + /**
  130 + * @return \yii\db\ActiveQuery
  131 + */
  132 + public function getRoad()
  133 + {
  134 + return $this->hasOne(Road::className(), [ 'road_id' => 'road_id' ])
  135 + ->inverseOf('settlementAddressLinks');
  136 + }
  137 +
  138 + /**
  139 + * @return \yii\db\ActiveQuery
  140 + */
  141 + public function getSettlement()
  142 + {
  143 + return $this->hasOne(Settlement::className(), [ 'settlement_id' => 'settlement_id' ])
  144 + ->inverseOf('settlementAddressLinks');
  145 + }
  146 +
  147 + /**
  148 + * @return \yii\db\ActiveQuery
  149 + */
  150 + public function getSettlementLocation()
  151 + {
  152 + return $this->hasOne(SettlementLocation::className(), [ 'settlement_location_id' => 'settlement_location_id' ])
  153 + ->inverseOf('settlementAddressLinks');
  154 + }
  155 +
  156 + public function getBeginString()
  157 + {
  158 + return floor($this->begin) . '+' . ( str_pad(round(( $this->begin - floor($this->begin) ) * 1000), 3, '0', STR_PAD_LEFT) );
  159 + }
  160 +
  161 + public function getEndString()
  162 + {
  163 + return floor($this->end) . '+' . ( str_pad(round(( $this->end - floor($this->end) ) * 1000), 3, '0', STR_PAD_LEFT) );
  164 + }
  165 + }
... ...
common/models/SettlementAddressLinkSearch.php 0 → 100644
  1 +++ a/common/models/SettlementAddressLinkSearch.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +use yii\base\Model;
  7 +use yii\data\ActiveDataProvider;
  8 +use common\models\SettlementAddressLink;
  9 +
  10 +/**
  11 + * SettlementAddressLinkSearch represents the model behind the search form about `common\models\SettlementAddressLink`.
  12 + */
  13 +class SettlementAddressLinkSearch extends SettlementAddressLink
  14 +{
  15 + /**
  16 + * @inheritdoc
  17 + */
  18 + public function rules()
  19 + {
  20 + return [
  21 + [['settlement_address_link_id', 'road_id', 'region_id', 'settlement_location_id', 'settlement_id'], 'integer'],
  22 + [['begin', 'end', 'distance'], 'number'],
  23 + ];
  24 + }
  25 +
  26 + /**
  27 + * @inheritdoc
  28 + */
  29 + public function scenarios()
  30 + {
  31 + // bypass scenarios() implementation in the parent class
  32 + return Model::scenarios();
  33 + }
  34 +
  35 + /**
  36 + * Creates data provider instance with search query applied
  37 + *
  38 + * @param array $params
  39 + *
  40 + * @return ActiveDataProvider
  41 + */
  42 + public function search($params)
  43 + {
  44 + $query = SettlementAddressLink::find()->joinWith(['road', 'region', 'settlement', 'settlementLocation']);
  45 +
  46 + // add conditions that should always apply here
  47 +
  48 + $dataProvider = new ActiveDataProvider([
  49 + 'query' => $query,
  50 + ]);
  51 +
  52 + $this->load($params);
  53 +
  54 + if (!$this->validate()) {
  55 + // uncomment the following line if you do not want to return any records when validation fails
  56 + // $query->where('0=1');
  57 + return $dataProvider;
  58 + }
  59 +
  60 + // grid filtering conditions
  61 + $query->andFilterWhere([
  62 + 'settlement_address_link_id' => $this->settlement_address_link_id,
  63 + 'road_id' => $this->road_id,
  64 + 'region_id' => $this->region_id,
  65 + 'begin' => $this->begin,
  66 + 'end' => $this->end,
  67 + 'settlement_location_id' => $this->settlement_location_id,
  68 + 'settlement_id' => $this->settlement_id,
  69 + 'distance' => $this->distance,
  70 + ]);
  71 +
  72 + return $dataProvider;
  73 + }
  74 +}
... ...
common/models/SettlementLocation.php 0 → 100644
  1 +++ a/common/models/SettlementLocation.php
  1 +<?php
  2 +
  3 +namespace common\models;
  4 +
  5 +use Yii;
  6 +
  7 +/**
  8 + * This is the model class for table "settlement_location".
  9 + *
  10 + * @property integer $settlement_location_id
  11 + * @property string $value
  12 + *
  13 + * @property SettlementAddressLink[] $settlementAddressLinks
  14 + */
  15 +class SettlementLocation extends \yii\db\ActiveRecord
  16 +{
  17 + /**
  18 + * @inheritdoc
  19 + */
  20 + public static function tableName()
  21 + {
  22 + return 'settlement_location';
  23 + }
  24 +
  25 + /**
  26 + * @inheritdoc
  27 + */
  28 + public function rules()
  29 + {
  30 + return [
  31 + [['value'], 'required'],
  32 + [['value'], 'string', 'max' => 255],
  33 + ];
  34 + }
  35 +
  36 + /**
  37 + * @inheritdoc
  38 + */
  39 + public function attributeLabels()
  40 + {
  41 + return [
  42 + 'settlement_location_id' => 'Settlement Location ID',
  43 + 'value' => 'Value',
  44 + ];
  45 + }
  46 +
  47 + /**
  48 + * @return \yii\db\ActiveQuery
  49 + */
  50 + public function getSettlementAddressLinks()
  51 + {
  52 + return $this->hasMany(SettlementAddressLink::className(), ['settlement_location_id' => 'settlement_location_id'])->inverseOf('settlementLocation');
  53 + }
  54 +}
... ...
common/models/User.php 0 → 100755
  1 +++ a/common/models/User.php
  1 +<?php
  2 +namespace common\models;
  3 +
  4 +use Yii;
  5 +use yii\base\NotSupportedException;
  6 +use yii\behaviors\TimestampBehavior;
  7 +use yii\db\ActiveRecord;
  8 +use yii\web\IdentityInterface;
  9 +
  10 +/**
  11 + * User model
  12 + *
  13 + * @property integer $id
  14 + * @property string $username
  15 + * @property string $password_hash
  16 + * @property string $password_reset_token
  17 + * @property string $email
  18 + * @property string $auth_key
  19 + * @property integer $status
  20 + * @property integer $created_at
  21 + * @property integer $updated_at
  22 + * @property string $password write-only password
  23 + */
  24 +class User extends ActiveRecord implements IdentityInterface
  25 +{
  26 + const STATUS_DELETED = 0;
  27 + const STATUS_ACTIVE = 10;
  28 +
  29 +
  30 + /**
  31 + * @inheritdoc
  32 + */
  33 + public static function tableName()
  34 + {
  35 + return '{{%user}}';
  36 + }
  37 +
  38 + /**
  39 + * @inheritdoc
  40 + */
  41 + public function behaviors()
  42 + {
  43 + return [
  44 + TimestampBehavior::className(),
  45 + ];
  46 + }
  47 +
  48 + /**
  49 + * @inheritdoc
  50 + */
  51 + public function rules()
  52 + {
  53 + return [
  54 + ['status', 'default', 'value' => self::STATUS_ACTIVE],
  55 + ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]],
  56 + ];
  57 + }
  58 +
  59 + /**
  60 + * @inheritdoc
  61 + */
  62 + public static function findIdentity($id)
  63 + {
  64 + return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);
  65 + }
  66 +
  67 + /**
  68 + * @inheritdoc
  69 + */
  70 + public static function findIdentityByAccessToken($token, $type = null)
  71 + {
  72 + throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.');
  73 + }
  74 +
  75 + /**
  76 + * Finds user by username
  77 + *
  78 + * @param string $username
  79 + * @return static|null
  80 + */
  81 + public static function findByUsername($username)
  82 + {
  83 + return static::findOne(['username' => $username, 'status' => self::STATUS_ACTIVE]);
  84 + }
  85 +
  86 + /**
  87 + * Finds user by password reset token
  88 + *
  89 + * @param string $token password reset token
  90 + * @return static|null
  91 + */
  92 + public static function findByPasswordResetToken($token)
  93 + {
  94 + if (!static::isPasswordResetTokenValid($token)) {
  95 + return null;
  96 + }
  97 +
  98 + return static::findOne([
  99 + 'password_reset_token' => $token,
  100 + 'status' => self::STATUS_ACTIVE,
  101 + ]);
  102 + }
  103 +
  104 + /**
  105 + * Finds out if password reset token is valid
  106 + *
  107 + * @param string $token password reset token
  108 + * @return boolean
  109 + */
  110 + public static function isPasswordResetTokenValid($token)
  111 + {
  112 + if (empty($token)) {
  113 + return false;
  114 + }
  115 +
  116 + $timestamp = (int) substr($token, strrpos($token, '_') + 1);
  117 + $expire = Yii::$app->params['user.passwordResetTokenExpire'];
  118 + return $timestamp + $expire >= time();
  119 + }
  120 +
  121 + /**
  122 + * @inheritdoc
  123 + */
  124 + public function getId()
  125 + {
  126 + return $this->getPrimaryKey();
  127 + }
  128 +
  129 + /**
  130 + * @inheritdoc
  131 + */
  132 + public function getAuthKey()
  133 + {
  134 + return $this->auth_key;
  135 + }
  136 +
  137 + /**
  138 + * @inheritdoc
  139 + */
  140 + public function validateAuthKey($authKey)
  141 + {
  142 + return $this->getAuthKey() === $authKey;
  143 + }
  144 +
  145 + /**
  146 + * Validates password
  147 + *
  148 + * @param string $password password to validate
  149 + * @return boolean if password provided is valid for current user
  150 + */
  151 + public function validatePassword($password)
  152 + {
  153 + return Yii::$app->security->validatePassword($password, $this->password_hash);
  154 + }
  155 +
  156 + /**
  157 + * Generates password hash from password and sets it to the model
  158 + *
  159 + * @param string $password
  160 + */
  161 + public function setPassword($password)
  162 + {
  163 + $this->password_hash = Yii::$app->security->generatePasswordHash($password);
  164 + }
  165 +
  166 + /**
  167 + * Generates "remember me" authentication key
  168 + */
  169 + public function generateAuthKey()
  170 + {
  171 + $this->auth_key = Yii::$app->security->generateRandomString();
  172 + }
  173 +
  174 + /**
  175 + * Generates new password reset token
  176 + */
  177 + public function generatePasswordResetToken()
  178 + {
  179 + $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();
  180 + }
  181 +
  182 + /**
  183 + * Removes password reset token
  184 + */
  185 + public function removePasswordResetToken()
  186 + {
  187 + $this->password_reset_token = null;
  188 + }
  189 +}
... ...
common/widgets/Alert.php 0 → 100755
  1 +++ a/common/widgets/Alert.php
  1 +<?php
  2 +/**
  3 + * @link http://www.yiiframework.com/
  4 + * @copyright Copyright (c) 2008 Yii Software LLC
  5 + * @license http://www.yiiframework.com/license/
  6 + */
  7 +
  8 +namespace common\widgets;
  9 +
  10 +/**
  11 + * Alert widget renders a message from session flash. All flash messages are displayed
  12 + * in the sequence they were assigned using setFlash. You can set message as following:
  13 + *
  14 + * ```php
  15 + * \Yii::$app->session->setFlash('error', 'This is the message');
  16 + * \Yii::$app->session->setFlash('success', 'This is the message');
  17 + * \Yii::$app->session->setFlash('info', 'This is the message');
  18 + * ```
  19 + *
  20 + * Multiple messages could be set as follows:
  21 + *
  22 + * ```php
  23 + * \Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']);
  24 + * ```
  25 + *
  26 + * @author Kartik Visweswaran <kartikv2@gmail.com>
  27 + * @author Alexander Makarov <sam@rmcreative.ru>
  28 + */
  29 +class Alert extends \yii\bootstrap\Widget
  30 +{
  31 + /**
  32 + * @var array the alert types configuration for the flash messages.
  33 + * This array is setup as $key => $value, where:
  34 + * - $key is the name of the session flash variable
  35 + * - $value is the bootstrap alert type (i.e. danger, success, info, warning)
  36 + */
  37 + public $alertTypes = [
  38 + 'error' => 'alert-danger',
  39 + 'danger' => 'alert-danger',
  40 + 'success' => 'alert-success',
  41 + 'info' => 'alert-info',
  42 + 'warning' => 'alert-warning'
  43 + ];
  44 + /**
  45 + * @var array the options for rendering the close button tag.
  46 + */
  47 + public $closeButton = [];
  48 +
  49 +
  50 + public function init()
  51 + {
  52 + parent::init();
  53 +
  54 + $session = \Yii::$app->session;
  55 + $flashes = $session->getAllFlashes();
  56 + $appendCss = isset($this->options['class']) ? ' ' . $this->options['class'] : '';
  57 +
  58 + foreach ($flashes as $type => $data) {
  59 + if (isset($this->alertTypes[$type])) {
  60 + $data = (array) $data;
  61 + foreach ($data as $i => $message) {
  62 + /* initialize css class for each alert box */
  63 + $this->options['class'] = $this->alertTypes[$type] . $appendCss;
  64 +
  65 + /* assign unique id to each alert box */
  66 + $this->options['id'] = $this->getId() . '-' . $type . '-' . $i;
  67 +
  68 + echo \yii\bootstrap\Alert::widget([
  69 + 'body' => $message,
  70 + 'closeButton' => $this->closeButton,
  71 + 'options' => $this->options,
  72 + ]);
  73 + }
  74 +
  75 + $session->removeFlash($type);
  76 + }
  77 + }
  78 + }
  79 +}
... ...
composer.json 0 → 100755
  1 +++ a/composer.json
  1 +{
  2 + "name": "yiisoft/yii2-app-advanced",
  3 + "description": "Yii 2 Advanced Project Template",
  4 + "keywords": ["yii2", "framework", "advanced", "project template"],
  5 + "homepage": "http://www.yiiframework.com/",
  6 + "type": "project",
  7 + "license": "BSD-3-Clause",
  8 + "support": {
  9 + "issues": "https://github.com/yiisoft/yii2/issues?state=open",
  10 + "forum": "http://www.yiiframework.com/forum/",
  11 + "wiki": "http://www.yiiframework.com/wiki/",
  12 + "irc": "irc://irc.freenode.net/yii",
  13 + "source": "https://github.com/yiisoft/yii2"
  14 + },
  15 + "minimum-stability": "stable",
  16 + "require": {
  17 + "php": ">=5.4.0",
  18 + "yiisoft/yii2": ">=2.0.6",
  19 + "yiisoft/yii2-bootstrap": "*",
  20 + "yiisoft/yii2-swiftmailer": "*"
  21 + },
  22 + "require-dev": {
  23 + "yiisoft/yii2-codeception": "*",
  24 + "yiisoft/yii2-debug": "*",
  25 + "yiisoft/yii2-gii": "*",
  26 + "yiisoft/yii2-faker": "*"
  27 + },
  28 + "config": {
  29 + "process-timeout": 1800
  30 + },
  31 + "extra": {
  32 + "asset-installer-paths": {
  33 + "npm-asset-library": "vendor/npm",
  34 + "bower-asset-library": "vendor/bower"
  35 + }
  36 + },
  37 + "scripts": {
  38 + "post-install-cmd": "php init --env=Development --overwrite=n"
  39 + }
  40 +}
... ...
composer.lock 0 → 100755
  1 +++ a/composer.lock
  1 +{
  2 + "_readme": [
  3 + "This file locks the dependencies of your project to a known state",
  4 + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
  5 + "This file is @generated automatically"
  6 + ],
  7 + "hash": "914f9194a4d021de88b285b03e683984",
  8 + "content-hash": "e1929a97e872bdbaacc8530468eccb67",
  9 + "packages": [
  10 + {
  11 + "name": "bower-asset/bootstrap",
  12 + "version": "v3.3.5",
  13 + "source": {
  14 + "type": "git",
  15 + "url": "https://github.com/twbs/bootstrap.git",
  16 + "reference": "16b48259a62f576e52c903c476bd42b90ab22482"
  17 + },
  18 + "dist": {
  19 + "type": "zip",
  20 + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/16b48259a62f576e52c903c476bd42b90ab22482",
  21 + "reference": "16b48259a62f576e52c903c476bd42b90ab22482",
  22 + "shasum": ""
  23 + },
  24 + "require": {
  25 + "bower-asset/jquery": ">=1.9.1"
  26 + },
  27 + "type": "bower-asset-library",
  28 + "extra": {
  29 + "bower-asset-main": [
  30 + "less/bootstrap.less",
  31 + "dist/js/bootstrap.js"
  32 + ],
  33 + "bower-asset-ignore": [
  34 + "/.*",
  35 + "_config.yml",
  36 + "CNAME",
  37 + "composer.json",
  38 + "CONTRIBUTING.md",
  39 + "docs",
  40 + "js/tests",
  41 + "test-infra"
  42 + ]
  43 + },
  44 + "license": [
  45 + "MIT"
  46 + ],
  47 + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
  48 + "keywords": [
  49 + "css",
  50 + "framework",
  51 + "front-end",
  52 + "js",
  53 + "less",
  54 + "mobile-first",
  55 + "responsive",
  56 + "web"
  57 + ]
  58 + },
  59 + {
  60 + "name": "bower-asset/jquery",
  61 + "version": "2.2.4",
  62 + "source": {
  63 + "type": "git",
  64 + "url": "https://github.com/jquery/jquery-dist.git",
  65 + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72"
  66 + },
  67 + "dist": {
  68 + "type": "zip",
  69 + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72",
  70 + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72",
  71 + "shasum": ""
  72 + },
  73 + "type": "bower-asset-library",
  74 + "extra": {
  75 + "bower-asset-main": "dist/jquery.js",
  76 + "bower-asset-ignore": [
  77 + "package.json"
  78 + ]
  79 + },
  80 + "license": [
  81 + "MIT"
  82 + ],
  83 + "keywords": [
  84 + "browser",
  85 + "javascript",
  86 + "jquery",
  87 + "library"
  88 + ]
  89 + },
  90 + {
  91 + "name": "bower-asset/jquery.inputmask",
  92 + "version": "3.2.7",
  93 + "source": {
  94 + "type": "git",
  95 + "url": "https://github.com/RobinHerbots/jquery.inputmask.git",
  96 + "reference": "5a72c563b502b8e05958a524cdfffafe9987be38"
  97 + },
  98 + "dist": {
  99 + "type": "zip",
  100 + "url": "https://api.github.com/repos/RobinHerbots/jquery.inputmask/zipball/5a72c563b502b8e05958a524cdfffafe9987be38",
  101 + "reference": "5a72c563b502b8e05958a524cdfffafe9987be38",
  102 + "shasum": ""
  103 + },
  104 + "require": {
  105 + "bower-asset/jquery": ">=1.7"
  106 + },
  107 + "type": "bower-asset-library",
  108 + "extra": {
  109 + "bower-asset-main": [
  110 + "./dist/inputmask/inputmask.js"
  111 + ],
  112 + "bower-asset-ignore": [
  113 + "**/*",
  114 + "!dist/*",
  115 + "!dist/inputmask/*",
  116 + "!dist/min/*",
  117 + "!dist/min/inputmask/*",
  118 + "!extra/bindings/*",
  119 + "!extra/dependencyLibs/*",
  120 + "!extra/phone-codes/*"
  121 + ]
  122 + },
  123 + "license": [
  124 + "http://opensource.org/licenses/mit-license.php"
  125 + ],
  126 + "description": "jquery.inputmask is a jquery plugin which create an input mask.",
  127 + "keywords": [
  128 + "form",
  129 + "input",
  130 + "inputmask",
  131 + "jquery",
  132 + "mask",
  133 + "plugins"
  134 + ]
  135 + },
  136 + {
  137 + "name": "bower-asset/punycode",
  138 + "version": "v1.3.2",
  139 + "source": {
  140 + "type": "git",
  141 + "url": "https://github.com/bestiejs/punycode.js.git",
  142 + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3"
  143 + },
  144 + "dist": {
  145 + "type": "zip",
  146 + "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3",
  147 + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3",
  148 + "shasum": ""
  149 + },
  150 + "type": "bower-asset-library",
  151 + "extra": {
  152 + "bower-asset-main": "punycode.js",
  153 + "bower-asset-ignore": [
  154 + "coverage",
  155 + "tests",
  156 + ".*",
  157 + "component.json",
  158 + "Gruntfile.js",
  159 + "node_modules",
  160 + "package.json"
  161 + ]
  162 + }
  163 + },
  164 + {
  165 + "name": "bower-asset/yii2-pjax",
  166 + "version": "v2.0.6",
  167 + "source": {
  168 + "type": "git",
  169 + "url": "https://github.com/yiisoft/jquery-pjax.git",
  170 + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978"
  171 + },
  172 + "dist": {
  173 + "type": "zip",
  174 + "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978",
  175 + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978",
  176 + "shasum": ""
  177 + },
  178 + "require": {
  179 + "bower-asset/jquery": ">=1.8"
  180 + },
  181 + "type": "bower-asset-library",
  182 + "extra": {
  183 + "bower-asset-main": "./jquery.pjax.js",
  184 + "bower-asset-ignore": [
  185 + ".travis.yml",
  186 + "Gemfile",
  187 + "Gemfile.lock",
  188 + "CONTRIBUTING.md",
  189 + "vendor/",
  190 + "script/",
  191 + "test/"
  192 + ]
  193 + },
  194 + "license": [
  195 + "MIT"
  196 + ]
  197 + },
  198 + {
  199 + "name": "cebe/markdown",
  200 + "version": "1.1.0",
  201 + "source": {
  202 + "type": "git",
  203 + "url": "https://github.com/cebe/markdown.git",
  204 + "reference": "54a2c49de31cc44e864ebf0500a35ef21d0010b2"
  205 + },
  206 + "dist": {
  207 + "type": "zip",
  208 + "url": "https://api.github.com/repos/cebe/markdown/zipball/54a2c49de31cc44e864ebf0500a35ef21d0010b2",
  209 + "reference": "54a2c49de31cc44e864ebf0500a35ef21d0010b2",
  210 + "shasum": ""
  211 + },
  212 + "require": {
  213 + "lib-pcre": "*",
  214 + "php": ">=5.4.0"
  215 + },
  216 + "require-dev": {
  217 + "cebe/indent": "*",
  218 + "facebook/xhprof": "*@dev",
  219 + "phpunit/phpunit": "4.1.*"
  220 + },
  221 + "bin": [
  222 + "bin/markdown"
  223 + ],
  224 + "type": "library",
  225 + "extra": {
  226 + "branch-alias": {
  227 + "dev-master": "1.1.x-dev"
  228 + }
  229 + },
  230 + "autoload": {
  231 + "psr-4": {
  232 + "cebe\\markdown\\": ""
  233 + }
  234 + },
  235 + "notification-url": "https://packagist.org/downloads/",
  236 + "license": [
  237 + "MIT"
  238 + ],
  239 + "authors": [
  240 + {
  241 + "name": "Carsten Brandt",
  242 + "email": "mail@cebe.cc",
  243 + "homepage": "http://cebe.cc/",
  244 + "role": "Creator"
  245 + }
  246 + ],
  247 + "description": "A super fast, highly extensible markdown parser for PHP",
  248 + "homepage": "https://github.com/cebe/markdown#readme",
  249 + "keywords": [
  250 + "extensible",
  251 + "fast",
  252 + "gfm",
  253 + "markdown",
  254 + "markdown-extra"
  255 + ],
  256 + "time": "2015-03-06 05:28:07"
  257 + },
  258 + {
  259 + "name": "ezyang/htmlpurifier",
  260 + "version": "v4.7.0",
  261 + "source": {
  262 + "type": "git",
  263 + "url": "https://github.com/ezyang/htmlpurifier.git",
  264 + "reference": "ae1828d955112356f7677c465f94f7deb7d27a40"
  265 + },
  266 + "dist": {
  267 + "type": "zip",
  268 + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/ae1828d955112356f7677c465f94f7deb7d27a40",
  269 + "reference": "ae1828d955112356f7677c465f94f7deb7d27a40",
  270 + "shasum": ""
  271 + },
  272 + "require": {
  273 + "php": ">=5.2"
  274 + },
  275 + "type": "library",
  276 + "autoload": {
  277 + "psr-0": {
  278 + "HTMLPurifier": "library/"
  279 + },
  280 + "files": [
  281 + "library/HTMLPurifier.composer.php"
  282 + ]
  283 + },
  284 + "notification-url": "https://packagist.org/downloads/",
  285 + "license": [
  286 + "LGPL"
  287 + ],
  288 + "authors": [
  289 + {
  290 + "name": "Edward Z. Yang",
  291 + "email": "admin@htmlpurifier.org",
  292 + "homepage": "http://ezyang.com"
  293 + }
  294 + ],
  295 + "description": "Standards compliant HTML filter written in PHP",
  296 + "homepage": "http://htmlpurifier.org/",
  297 + "keywords": [
  298 + "html"
  299 + ],
  300 + "time": "2015-08-05 01:03:42"
  301 + },
  302 + {
  303 + "name": "swiftmailer/swiftmailer",
  304 + "version": "v5.4.2",
  305 + "source": {
  306 + "type": "git",
  307 + "url": "https://github.com/swiftmailer/swiftmailer.git",
  308 + "reference": "d8db871a54619458a805229a057ea2af33c753e8"
  309 + },
  310 + "dist": {
  311 + "type": "zip",
  312 + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/d8db871a54619458a805229a057ea2af33c753e8",
  313 + "reference": "d8db871a54619458a805229a057ea2af33c753e8",
  314 + "shasum": ""
  315 + },
  316 + "require": {
  317 + "php": ">=5.3.3"
  318 + },
  319 + "require-dev": {
  320 + "mockery/mockery": "~0.9.1,<0.9.4"
  321 + },
  322 + "type": "library",
  323 + "extra": {
  324 + "branch-alias": {
  325 + "dev-master": "5.4-dev"
  326 + }
  327 + },
  328 + "autoload": {
  329 + "files": [
  330 + "lib/swift_required.php"
  331 + ]
  332 + },
  333 + "notification-url": "https://packagist.org/downloads/",
  334 + "license": [
  335 + "MIT"
  336 + ],
  337 + "authors": [
  338 + {
  339 + "name": "Chris Corbyn"
  340 + },
  341 + {
  342 + "name": "Fabien Potencier",
  343 + "email": "fabien@symfony.com"
  344 + }
  345 + ],
  346 + "description": "Swiftmailer, free feature-rich PHP mailer",
  347 + "homepage": "http://swiftmailer.org",
  348 + "keywords": [
  349 + "email",
  350 + "mail",
  351 + "mailer"
  352 + ],
  353 + "time": "2016-05-01 08:45:47"
  354 + },
  355 + {
  356 + "name": "yiisoft/yii2",
  357 + "version": "2.0.8",
  358 + "source": {
  359 + "type": "git",
  360 + "url": "https://github.com/yiisoft/yii2-framework.git",
  361 + "reference": "53992b136b993e32ca7b6f399cf42b143f8685a6"
  362 + },
  363 + "dist": {
  364 + "type": "zip",
  365 + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/53992b136b993e32ca7b6f399cf42b143f8685a6",
  366 + "reference": "53992b136b993e32ca7b6f399cf42b143f8685a6",
  367 + "shasum": ""
  368 + },
  369 + "require": {
  370 + "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable",
  371 + "bower-asset/jquery.inputmask": "~3.2.2",
  372 + "bower-asset/punycode": "1.3.*",
  373 + "bower-asset/yii2-pjax": "~2.0.1",
  374 + "cebe/markdown": "~1.0.0 | ~1.1.0",
  375 + "ext-ctype": "*",
  376 + "ext-mbstring": "*",
  377 + "ezyang/htmlpurifier": "~4.6",
  378 + "lib-pcre": "*",
  379 + "php": ">=5.4.0",
  380 + "yiisoft/yii2-composer": "~2.0.4"
  381 + },
  382 + "bin": [
  383 + "yii"
  384 + ],
  385 + "type": "library",
  386 + "extra": {
  387 + "branch-alias": {
  388 + "dev-master": "2.0.x-dev"
  389 + }
  390 + },
  391 + "autoload": {
  392 + "psr-4": {
  393 + "yii\\": ""
  394 + }
  395 + },
  396 + "notification-url": "https://packagist.org/downloads/",
  397 + "license": [
  398 + "BSD-3-Clause"
  399 + ],
  400 + "authors": [
  401 + {
  402 + "name": "Qiang Xue",
  403 + "email": "qiang.xue@gmail.com",
  404 + "homepage": "http://www.yiiframework.com/",
  405 + "role": "Founder and project lead"
  406 + },
  407 + {
  408 + "name": "Alexander Makarov",
  409 + "email": "sam@rmcreative.ru",
  410 + "homepage": "http://rmcreative.ru/",
  411 + "role": "Core framework development"
  412 + },
  413 + {
  414 + "name": "Maurizio Domba",
  415 + "homepage": "http://mdomba.info/",
  416 + "role": "Core framework development"
  417 + },
  418 + {
  419 + "name": "Carsten Brandt",
  420 + "email": "mail@cebe.cc",
  421 + "homepage": "http://cebe.cc/",
  422 + "role": "Core framework development"
  423 + },
  424 + {
  425 + "name": "Timur Ruziev",
  426 + "email": "resurtm@gmail.com",
  427 + "homepage": "http://resurtm.com/",
  428 + "role": "Core framework development"
  429 + },
  430 + {
  431 + "name": "Paul Klimov",
  432 + "email": "klimov.paul@gmail.com",
  433 + "role": "Core framework development"
  434 + },
  435 + {
  436 + "name": "Dmitry Naumenko",
  437 + "email": "d.naumenko.a@gmail.com",
  438 + "role": "Core framework development"
  439 + }
  440 + ],
  441 + "description": "Yii PHP Framework Version 2",
  442 + "homepage": "http://www.yiiframework.com/",
  443 + "keywords": [
  444 + "framework",
  445 + "yii2"
  446 + ],
  447 + "time": "2016-04-28 14:50:20"
  448 + },
  449 + {
  450 + "name": "yiisoft/yii2-bootstrap",
  451 + "version": "2.0.6",
  452 + "source": {
  453 + "type": "git",
  454 + "url": "https://github.com/yiisoft/yii2-bootstrap.git",
  455 + "reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5"
  456 + },
  457 + "dist": {
  458 + "type": "zip",
  459 + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5",
  460 + "reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5",
  461 + "shasum": ""
  462 + },
  463 + "require": {
  464 + "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*",
  465 + "yiisoft/yii2": ">=2.0.6"
  466 + },
  467 + "type": "yii2-extension",
  468 + "extra": {
  469 + "branch-alias": {
  470 + "dev-master": "2.0.x-dev"
  471 + },
  472 + "asset-installer-paths": {
  473 + "npm-asset-library": "vendor/npm",
  474 + "bower-asset-library": "vendor/bower"
  475 + }
  476 + },
  477 + "autoload": {
  478 + "psr-4": {
  479 + "yii\\bootstrap\\": ""
  480 + }
  481 + },
  482 + "notification-url": "https://packagist.org/downloads/",
  483 + "license": [
  484 + "BSD-3-Clause"
  485 + ],
  486 + "authors": [
  487 + {
  488 + "name": "Qiang Xue",
  489 + "email": "qiang.xue@gmail.com"
  490 + }
  491 + ],
  492 + "description": "The Twitter Bootstrap extension for the Yii framework",
  493 + "keywords": [
  494 + "bootstrap",
  495 + "yii2"
  496 + ],
  497 + "time": "2016-03-17 03:29:28"
  498 + },
  499 + {
  500 + "name": "yiisoft/yii2-composer",
  501 + "version": "2.0.4",
  502 + "source": {
  503 + "type": "git",
  504 + "url": "https://github.com/yiisoft/yii2-composer.git",
  505 + "reference": "7452fd908a5023b8bb5ea1b123a174ca080de464"
  506 + },
  507 + "dist": {
  508 + "type": "zip",
  509 + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/7452fd908a5023b8bb5ea1b123a174ca080de464",
  510 + "reference": "7452fd908a5023b8bb5ea1b123a174ca080de464",
  511 + "shasum": ""
  512 + },
  513 + "require": {
  514 + "composer-plugin-api": "^1.0"
  515 + },
  516 + "type": "composer-plugin",
  517 + "extra": {
  518 + "class": "yii\\composer\\Plugin",
  519 + "branch-alias": {
  520 + "dev-master": "2.0.x-dev"
  521 + }
  522 + },
  523 + "autoload": {
  524 + "psr-4": {
  525 + "yii\\composer\\": ""
  526 + }
  527 + },
  528 + "notification-url": "https://packagist.org/downloads/",
  529 + "license": [
  530 + "BSD-3-Clause"
  531 + ],
  532 + "authors": [
  533 + {
  534 + "name": "Qiang Xue",
  535 + "email": "qiang.xue@gmail.com"
  536 + }
  537 + ],
  538 + "description": "The composer plugin for Yii extension installer",
  539 + "keywords": [
  540 + "composer",
  541 + "extension installer",
  542 + "yii2"
  543 + ],
  544 + "time": "2016-02-06 00:49:24"
  545 + },
  546 + {
  547 + "name": "yiisoft/yii2-swiftmailer",
  548 + "version": "2.0.5",
  549 + "source": {
  550 + "type": "git",
  551 + "url": "https://github.com/yiisoft/yii2-swiftmailer.git",
  552 + "reference": "e2c6315caff30a9271a7afad4d684627721dc69a"
  553 + },
  554 + "dist": {
  555 + "type": "zip",
  556 + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/e2c6315caff30a9271a7afad4d684627721dc69a",
  557 + "reference": "e2c6315caff30a9271a7afad4d684627721dc69a",
  558 + "shasum": ""
  559 + },
  560 + "require": {
  561 + "swiftmailer/swiftmailer": "~5.0",
  562 + "yiisoft/yii2": ">=2.0.4"
  563 + },
  564 + "type": "yii2-extension",
  565 + "extra": {
  566 + "branch-alias": {
  567 + "dev-master": "2.0.x-dev"
  568 + }
  569 + },
  570 + "autoload": {
  571 + "psr-4": {
  572 + "yii\\swiftmailer\\": ""
  573 + }
  574 + },
  575 + "notification-url": "https://packagist.org/downloads/",
  576 + "license": [
  577 + "BSD-3-Clause"
  578 + ],
  579 + "authors": [
  580 + {
  581 + "name": "Paul Klimov",
  582 + "email": "klimov.paul@gmail.com"
  583 + }
  584 + ],
  585 + "description": "The SwiftMailer integration for the Yii framework",
  586 + "keywords": [
  587 + "email",
  588 + "mail",
  589 + "mailer",
  590 + "swift",
  591 + "swiftmailer",
  592 + "yii2"
  593 + ],
  594 + "time": "2016-03-17 03:58:49"
  595 + }
  596 + ],
  597 + "packages-dev": [
  598 + {
  599 + "name": "bower-asset/typeahead.js",
  600 + "version": "v0.11.1",
  601 + "source": {
  602 + "type": "git",
  603 + "url": "https://github.com/twitter/typeahead.js.git",
  604 + "reference": "588440f66559714280628a4f9799f0c4eb880a4a"
  605 + },
  606 + "dist": {
  607 + "type": "zip",
  608 + "url": "https://api.github.com/repos/twitter/typeahead.js/zipball/588440f66559714280628a4f9799f0c4eb880a4a",
  609 + "reference": "588440f66559714280628a4f9799f0c4eb880a4a",
  610 + "shasum": ""
  611 + },
  612 + "require": {
  613 + "bower-asset/jquery": ">=1.7"
  614 + },
  615 + "require-dev": {
  616 + "bower-asset/jasmine-ajax": "~1.3.1",
  617 + "bower-asset/jasmine-jquery": "~1.5.2",
  618 + "bower-asset/jquery": "~1.7"
  619 + },
  620 + "type": "bower-asset-library",
  621 + "extra": {
  622 + "bower-asset-main": "dist/typeahead.bundle.js"
  623 + }
  624 + },
  625 + {
  626 + "name": "fzaninotto/faker",
  627 + "version": "v1.6.0",
  628 + "source": {
  629 + "type": "git",
  630 + "url": "https://github.com/fzaninotto/Faker.git",
  631 + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123"
  632 + },
  633 + "dist": {
  634 + "type": "zip",
  635 + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123",
  636 + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123",
  637 + "shasum": ""
  638 + },
  639 + "require": {
  640 + "php": "^5.3.3|^7.0"
  641 + },
  642 + "require-dev": {
  643 + "ext-intl": "*",
  644 + "phpunit/phpunit": "~4.0",
  645 + "squizlabs/php_codesniffer": "~1.5"
  646 + },
  647 + "type": "library",
  648 + "extra": {
  649 + "branch-alias": []
  650 + },
  651 + "autoload": {
  652 + "psr-4": {
  653 + "Faker\\": "src/Faker/"
  654 + }
  655 + },
  656 + "notification-url": "https://packagist.org/downloads/",
  657 + "license": [
  658 + "MIT"
  659 + ],
  660 + "authors": [
  661 + {
  662 + "name": "François Zaninotto"
  663 + }
  664 + ],
  665 + "description": "Faker is a PHP library that generates fake data for you.",
  666 + "keywords": [
  667 + "data",
  668 + "faker",
  669 + "fixtures"
  670 + ],
  671 + "time": "2016-04-29 12:21:54"
  672 + },
  673 + {
  674 + "name": "phpspec/php-diff",
  675 + "version": "v1.1.0",
  676 + "source": {
  677 + "type": "git",
  678 + "url": "https://github.com/phpspec/php-diff.git",
  679 + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a"
  680 + },
  681 + "dist": {
  682 + "type": "zip",
  683 + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/0464787bfa7cd13576c5a1e318709768798bec6a",
  684 + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a",
  685 + "shasum": ""
  686 + },
  687 + "type": "library",
  688 + "extra": {
  689 + "branch-alias": {
  690 + "dev-master": "1.0.x-dev"
  691 + }
  692 + },
  693 + "autoload": {
  694 + "psr-0": {
  695 + "Diff": "lib/"
  696 + }
  697 + },
  698 + "notification-url": "https://packagist.org/downloads/",
  699 + "license": [
  700 + "BSD-3-Clause"
  701 + ],
  702 + "authors": [
  703 + {
  704 + "name": "Chris Boulton",
  705 + "homepage": "http://github.com/chrisboulton"
  706 + }
  707 + ],
  708 + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).",
  709 + "time": "2016-04-07 12:29:16"
  710 + },
  711 + {
  712 + "name": "yiisoft/yii2-codeception",
  713 + "version": "2.0.5",
  714 + "source": {
  715 + "type": "git",
  716 + "url": "https://github.com/yiisoft/yii2-codeception.git",
  717 + "reference": "c916a36d09fc128b05a374e7922bc56854334d56"
  718 + },
  719 + "dist": {
  720 + "type": "zip",
  721 + "url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/c916a36d09fc128b05a374e7922bc56854334d56",
  722 + "reference": "c916a36d09fc128b05a374e7922bc56854334d56",
  723 + "shasum": ""
  724 + },
  725 + "require": {
  726 + "yiisoft/yii2": ">=2.0.4"
  727 + },
  728 + "type": "yii2-extension",
  729 + "extra": {
  730 + "branch-alias": {
  731 + "dev-master": "2.0.x-dev"
  732 + }
  733 + },
  734 + "autoload": {
  735 + "psr-4": {
  736 + "yii\\codeception\\": ""
  737 + }
  738 + },
  739 + "notification-url": "https://packagist.org/downloads/",
  740 + "license": [
  741 + "BSD-3-Clause"
  742 + ],
  743 + "authors": [
  744 + {
  745 + "name": "Mark Jebri",
  746 + "email": "mark.github@yandex.ru"
  747 + }
  748 + ],
  749 + "description": "The Codeception integration for the Yii framework",
  750 + "keywords": [
  751 + "codeception",
  752 + "yii2"
  753 + ],
  754 + "time": "2016-03-17 03:41:26"
  755 + },
  756 + {
  757 + "name": "yiisoft/yii2-debug",
  758 + "version": "2.0.6",
  759 + "source": {
  760 + "type": "git",
  761 + "url": "https://github.com/yiisoft/yii2-debug.git",
  762 + "reference": "55ed2e853ed8050a34415f63a4da84f88a56f895"
  763 + },
  764 + "dist": {
  765 + "type": "zip",
  766 + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/55ed2e853ed8050a34415f63a4da84f88a56f895",
  767 + "reference": "55ed2e853ed8050a34415f63a4da84f88a56f895",
  768 + "shasum": ""
  769 + },
  770 + "require": {
  771 + "yiisoft/yii2": ">=2.0.4",
  772 + "yiisoft/yii2-bootstrap": "*"
  773 + },
  774 + "type": "yii2-extension",
  775 + "extra": {
  776 + "branch-alias": {
  777 + "dev-master": "2.0.x-dev"
  778 + }
  779 + },
  780 + "autoload": {
  781 + "psr-4": {
  782 + "yii\\debug\\": ""
  783 + }
  784 + },
  785 + "notification-url": "https://packagist.org/downloads/",
  786 + "license": [
  787 + "BSD-3-Clause"
  788 + ],
  789 + "authors": [
  790 + {
  791 + "name": "Qiang Xue",
  792 + "email": "qiang.xue@gmail.com"
  793 + }
  794 + ],
  795 + "description": "The debugger extension for the Yii framework",
  796 + "keywords": [
  797 + "debug",
  798 + "debugger",
  799 + "yii2"
  800 + ],
  801 + "time": "2016-03-17 03:50:19"
  802 + },
  803 + {
  804 + "name": "yiisoft/yii2-faker",
  805 + "version": "2.0.3",
  806 + "source": {
  807 + "type": "git",
  808 + "url": "https://github.com/yiisoft/yii2-faker.git",
  809 + "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c"
  810 + },
  811 + "dist": {
  812 + "type": "zip",
  813 + "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/b88ca69ee226a3610b2c26c026c3203d7ac50f6c",
  814 + "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c",
  815 + "shasum": ""
  816 + },
  817 + "require": {
  818 + "fzaninotto/faker": "*",
  819 + "yiisoft/yii2": "*"
  820 + },
  821 + "type": "yii2-extension",
  822 + "extra": {
  823 + "branch-alias": {
  824 + "dev-master": "2.0.x-dev"
  825 + }
  826 + },
  827 + "autoload": {
  828 + "psr-4": {
  829 + "yii\\faker\\": ""
  830 + }
  831 + },
  832 + "notification-url": "https://packagist.org/downloads/",
  833 + "license": [
  834 + "BSD-3-Clause"
  835 + ],
  836 + "authors": [
  837 + {
  838 + "name": "Mark Jebri",
  839 + "email": "mark.github@yandex.ru"
  840 + }
  841 + ],
  842 + "description": "Fixture generator. The Faker integration for the Yii framework.",
  843 + "keywords": [
  844 + "Fixture",
  845 + "faker",
  846 + "yii2"
  847 + ],
  848 + "time": "2015-03-01 06:22:44"
  849 + },
  850 + {
  851 + "name": "yiisoft/yii2-gii",
  852 + "version": "2.0.5",
  853 + "source": {
  854 + "type": "git",
  855 + "url": "https://github.com/yiisoft/yii2-gii.git",
  856 + "reference": "1bd6df6804ca077ec022587905a0d43eb286f507"
  857 + },
  858 + "dist": {
  859 + "type": "zip",
  860 + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/1bd6df6804ca077ec022587905a0d43eb286f507",
  861 + "reference": "1bd6df6804ca077ec022587905a0d43eb286f507",
  862 + "shasum": ""
  863 + },
  864 + "require": {
  865 + "bower-asset/typeahead.js": "0.10.* | ~0.11.0",
  866 + "phpspec/php-diff": ">=1.0.2",
  867 + "yiisoft/yii2": ">=2.0.4",
  868 + "yiisoft/yii2-bootstrap": "~2.0"
  869 + },
  870 + "type": "yii2-extension",
  871 + "extra": {
  872 + "branch-alias": {
  873 + "dev-master": "2.0.x-dev"
  874 + },
  875 + "asset-installer-paths": {
  876 + "npm-asset-library": "vendor/npm",
  877 + "bower-asset-library": "vendor/bower"
  878 + }
  879 + },
  880 + "autoload": {
  881 + "psr-4": {
  882 + "yii\\gii\\": ""
  883 + }
  884 + },
  885 + "notification-url": "https://packagist.org/downloads/",
  886 + "license": [
  887 + "BSD-3-Clause"
  888 + ],
  889 + "authors": [
  890 + {
  891 + "name": "Qiang Xue",
  892 + "email": "qiang.xue@gmail.com"
  893 + }
  894 + ],
  895 + "description": "The Gii extension for the Yii framework",
  896 + "keywords": [
  897 + "code generator",
  898 + "gii",
  899 + "yii2"
  900 + ],
  901 + "time": "2016-03-18 14:09:46"
  902 + }
  903 + ],
  904 + "aliases": [],
  905 + "minimum-stability": "stable",
  906 + "stability-flags": [],
  907 + "prefer-stable": false,
  908 + "prefer-lowest": false,
  909 + "platform": {
  910 + "php": ">=5.4.0"
  911 + },
  912 + "platform-dev": []
  913 +}
... ...
console/config/.gitignore 0 → 100755
  1 +++ a/console/config/.gitignore
  1 +main-local.php
  2 +params-local.php
0 3 \ No newline at end of file
... ...
console/config/bootstrap.php 0 → 100755
  1 +++ a/console/config/bootstrap.php
  1 +<?php
... ...
console/config/main.php 0 → 100755
  1 +++ a/console/config/main.php
  1 +<?php
  2 +$params = array_merge(
  3 + require(__DIR__ . '/../../common/config/params.php'),
  4 + require(__DIR__ . '/../../common/config/params-local.php'),
  5 + require(__DIR__ . '/params.php'),
  6 + require(__DIR__ . '/params-local.php')
  7 +);
  8 +
  9 +return [
  10 + 'id' => 'app-console',
  11 + 'basePath' => dirname(__DIR__),
  12 + 'bootstrap' => ['log'],
  13 + 'controllerNamespace' => 'console\controllers',
  14 + 'components' => [
  15 + 'log' => [
  16 + 'targets' => [
  17 + [
  18 + 'class' => 'yii\log\FileTarget',
  19 + 'levels' => ['error', 'warning'],
  20 + ],
  21 + ],
  22 + ],
  23 + ],
  24 + 'params' => $params,
  25 +];
... ...
console/config/params.php 0 → 100755
  1 +++ a/console/config/params.php
  1 +<?php
  2 +return [
  3 + 'adminEmail' => 'admin@example.com',
  4 +];
... ...
console/controllers/.gitkeep 0 → 100755
  1 +++ a/console/controllers/.gitkeep
... ...
console/migrations/_m160609_074818_tables.php 0 → 100755
  1 +++ a/console/migrations/_m160609_074818_tables.php
  1 +<?php
  2 +
  3 +use yii\db\Migration;
  4 +
  5 +class m160609_074818_tables extends Migration
  6 +{
  7 + public function up()
  8 + {
  9 + // Table 5.9
  10 + $this->createTable('road_surface', [
  11 + 'road_surface_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  12 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  13 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  14 + 'begin_section' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  15 + 'end_section' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  16 + 'lane_count_left' => $this->integer()->comment('Кількість смуг руху ліворуч'),
  17 + 'lane_count_right' => $this->integer()->comment('Кількість смуг руху праворуч'),
  18 + 'road_surface_construction' => $this->string()->comment('Конструкція дорожнього одягу (окрема облікова картка; табл. 5.10)'),
  19 + 'elastisity_module' => $this->decimal()->comment('Фактичний модуль пружності (згідно з [9]; з двома цифрами після коми)'),
  20 + ]);
  21 + $this->addCommentOnTable('road_surface', 'Дані про дорожній одяг');
  22 +
  23 + // Table 5.10
  24 + $this->createTable('structural_layers', [
  25 + 'structural_layers_id' => $this->primaryKey()->comment('згідно з [4]'),
  26 + 'layer_number' => $this->integer()->comment('Номер шару'),
  27 + 'material_code' => $this->integer()->comment('Код матеріалу (згідно з [4])'),
  28 + 'layer_width' => $this->decimal()->comment('Товщина шару (в сантиметрах)'),
  29 + 'strength_coef' => $this->decimal()->comment('Коефіцієнт впливу міцності складових шару К МЦ (згідно з [17]; з двома цифрами після коми)'),
  30 + 'viscosity_coef' => $this->decimal()->comment('Коефіцієнт впливу в\'яжучого К В (згідно з [17]; з двома цифрами після коми)'),
  31 + 'technology_coef' => $this->decimal()->comment('Коефіцієнт впливу якості технології К Т (згідно з [17]; з двома цифрами після коми)'),
  32 + 'conditions_coef' => $this->decimal()->comment('Коефіцієнт впливу умов служби К С (згідно з [17]; з двома цифрами після коми)'),
  33 + 'land_soil' => $this->string()->comment('Ґрунт земляного полотна (згідно з [4])'),
  34 + 'elastisity_module' => $this->decimal()->comment('Модуль пружності (згідно з [9]; з двома цифрами після коми)'),
  35 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  36 + ]);
  37 + $this->addCommentOnTable('structural_layers', 'Дані про конструктивні шари дорожнього одягу');
  38 +
  39 + // Table 5.11
  40 + $this->createTable('road_surface_strenght', [
  41 + 'road_surface_strenght_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  42 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  43 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  44 + 'begin_section' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  45 + 'end_section' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  46 + 'lane_count_left' => $this->integer()->comment('Кількість смуг руху ліворуч'),
  47 + 'lane_count_right' => $this->integer()->comment('Кількість смуг руху праворуч'),
  48 + 'elastisity_module' => $this->decimal()->comment('Фактичний модуль пружності (згідно з [9]; з двома цифрами після коми)'),
  49 + 'elastisity_module_calc' => $this->decimal()->comment('Розрахунковий модуль пружності (згідно з [9]; з двома цифрами після коми)'),
  50 + 'safety_margin_coef' => $this->decimal()->comment('Коефіцієнт запасу міцності (згідно з [9]; з двома цифрами після коми)'),
  51 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  52 + ]);
  53 + $this->addCommentOnTable('road_surface_strenght', 'Дані про міцність дорожнього одягу');
  54 +
  55 + // Table 5.12
  56 + $this->createTable('road_surface_flatness', [
  57 + 'road_surface_flatness_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  58 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  59 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  60 + 'begin_section' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  61 + 'end_section' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  62 + 'lane_count_left' => $this->integer()->comment('Кількість смуг руху ліворуч'),
  63 + 'lane_count_right' => $this->integer()->comment('Кількість смуг руху праворуч'),
  64 + 'forward_lanes_iri' => $this->decimal()->comment('Показник IRI смуг прямого напрямку руху (згідно з [9]; з двома цифрами після коми)'),
  65 + 'back_lanes_iri' => $this->decimal()->comment('Показник IRI смуг зворотного напрямку руху (згідно з [9]; з двома цифрами після коми)'),
  66 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  67 + ]);
  68 + $this->addCommentOnTable('road_surface_flatness', 'Дані про рівність покриття');
  69 +
  70 + // Table 5.13
  71 + $this->createTable('road_surface_clutch', [
  72 + 'road_surface_clutch_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  73 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  74 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  75 + 'begin_section' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  76 + 'end_section' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  77 + 'lane_count_left' => $this->integer()->comment('Кількість смуг руху ліворуч'),
  78 + 'lane_count_right' => $this->integer()->comment('Кількість смуг руху праворуч'),
  79 + 'forward_lanes_hollow' => $this->decimal()->comment('Середня величина заглиблень шорсткості (h свр )смуг прямого напрямку руху (згідно з [18]; з двома цифрами після коми)'),
  80 + 'forward_lanes_density' => $this->decimal()->comment('Середня щільність виступів шорсткості (і n ) смуг прямого напрямку руху (згідно з [18]; з двома цифрами після коми)'),
  81 + 'forward_lanes_ledge' => $this->decimal()->comment('Середній радіус виступів шорсткості (R свр ) смуг прямого напрямку руху (згідно з [18]; з двома цифрами після коми)'),
  82 + 'back_lanes_hollow' => $this->decimal()->comment('Середня величина заглиблень шорсткості (h свр )смуг зворотнього напрямку руху (згідно з [18]; з двома цифрами після коми)'),
  83 + 'back_lanes_density' => $this->decimal()->comment('Середня щільність виступів шорсткості (і n ) смуг зворотнього напрямку руху (згідно з [18]; з двома цифрами після коми)'),
  84 + 'back_lanes_ledge' => $this->decimal()->comment('Середній радіус виступів шорсткості (R свр ) смуг зворотнього напрямку руху (згідно з [18]; з двома цифрами після коми)'),
  85 + 'clutch_coef' => $this->decimal()->comment('Фактичне значення коефіцієнта зчеплення (згідно з [18]; з двома цифрами після коми)'),
  86 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  87 + ]);
  88 + $this->addCommentOnTable('road_surface_clutch', 'Дані про зчіпні якості');
  89 +
  90 + // Table 5.14
  91 + $this->createTable('road_surface_damage', [
  92 + 'road_surface_damage_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  93 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  94 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  95 + 'begin_section' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  96 + 'end_section' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  97 + 'lane_count_left' => $this->integer()->comment('Кількість смуг руху ліворуч'),
  98 + 'lane_count_right' => $this->integer()->comment('Кількість смуг руху праворуч'),
  99 + 'back_lane_number' => $this->integer()->comment('Номер смуги зворотного напрямку руху'),
  100 + 'forward_lane_number' => $this->integer()->comment('Номер смуги прмямого напрямку руху'),
  101 + 'state_indicator' => $this->integer()->comment('Показник стану (табл. Б.2 СОУ 42.1-37641918-122)'),
  102 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  103 + ]);
  104 + $this->addCommentOnTable('road_surface_damage', 'Дані про пошкодження дорожнього одягу');
  105 +
  106 + // Table 5.15
  107 + $this->createTable('roadbed_size', [
  108 + 'roadbed_size_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  109 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  110 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  111 + 'cross_profile_position' => $this->string()->comment('Положення поперечного профілю (псевдогеодані)'),
  112 + 'road_category_id' => $this->integer()->comment('Категорія дороги (згідно з [4])'),
  113 + 'mound_left' => $this->decimal()->comment('Насип (виїмка) ліворуч (у метрах; з двома цифрами після коми)'),
  114 + 'mound_right' => $this->decimal()->comment('Насип (виїмка) праворуч (у метрах; з двома цифрами після коми)'),
  115 + 'mound_avarage_size' => $this->decimal()->comment('Середня величина насипу (виїмки) (у метрах; з двома цифрами після коми)'),
  116 + 'berm_third_width_left' => $this->decimal()->comment('Ширина 3-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  117 + 'berm_third_height_left' => $this->decimal()->comment('Висота 3-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  118 + 'berm_third_slope_left' => $this->decimal()->comment('Закладання укосу 3-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  119 + 'berm_second_width_left' => $this->decimal()->comment('Ширина 2-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  120 + 'berm_second_height_left' => $this->decimal()->comment('Висота 2-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  121 + 'berm_second_slope_left' => $this->decimal()->comment('Закладання укосу 2-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  122 + 'berm_first_width_left' => $this->decimal()->comment('Ширина 1-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  123 + 'berm_first_height_left' => $this->decimal()->comment('Висота 1-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  124 + 'berm_first_slope_left' => $this->decimal()->comment('Закладання укосу 1-ї берми ліворуч (у метрах; з двома цифрами після коми)'),
  125 + 'ditch_top_width_left' => $this->decimal()->comment('Ширина по верху кювету (кювету-резерву) ліворуч (у метрах; з двома цифрами після коми)'),
  126 + 'ditch_bottom_width_left' => $this->decimal()->comment('Ширина по низу кювету (кювету-резерву) ліворуч (у метрах; з двома цифрами після коми)'),
  127 + 'ditch_depth_left' => $this->decimal()->comment('Глибина кювету (кювету-резерву) ліворуч (у метрах; з двома цифрами після коми)'),
  128 + 'roadside_width_left' => $this->decimal()->comment('Ширина узбіччя ліворуч (у метрах; з двома цифрами після коми)'),
  129 + 'roadside_width_right' => $this->decimal()->comment('Ширина узбіччя праворуч (у метрах; з двома цифрами після коми)'),
  130 + 'ditch_top_width_right' => $this->decimal()->comment('Ширина по верху кювету (кювету-резерву) праворуч (у метрах; з двома цифрами після коми)'),
  131 + 'ditch_bottom_width_right' => $this->decimal()->comment('Ширина по низу кювету (кювету-резерву) праворуч (у метрах; з двома цифрами після коми)'),
  132 + 'ditch_depth_right' => $this->decimal()->comment('Глибина кювету (кювету-резерву) праворуч (у метрах; з двома цифрами після коми)'),
  133 + 'berm_third_width_right' => $this->decimal()->comment('Ширина 3-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  134 + 'berm_third_height_right' => $this->decimal()->comment('Висота 3-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  135 + 'berm_third_slope_right' => $this->decimal()->comment('Закладання укосу 3-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  136 + 'berm_second_width_right' => $this->decimal()->comment('Ширина 2-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  137 + 'berm_second_height_right' => $this->decimal()->comment('Висота 2-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  138 + 'berm_second_slope_right' => $this->decimal()->comment('Закладання укосу 2-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  139 + 'berm_first_width_right' => $this->decimal()->comment('Ширина 1-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  140 + 'berm_first_height_right' => $this->decimal()->comment('Висота 1-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  141 + 'berm_first_slope_right' => $this->decimal()->comment('Закладання укосу 1-ї берми праворуч (у метрах; з двома цифрами після коми)'),
  142 + 'road_surface_width' => $this->decimal()->comment('Ширина земляного полотна поверху (у метрах; з двома цифрами після коми)'),
  143 + 'road_surface_capacity' => $this->decimal()->comment('Об\'єм земляного полотна (у кубічних метрах; з двома цифрами після коми)'),
  144 + 'land_soil' => $this->string()->comment('Ґрунт земляного полотна (згідно з [4])'),
  145 + ]);
  146 + $this->addCommentOnTable('roadbed_size', 'Дані про геометричні розміри земляного полотна');
  147 +
  148 + // Table 5.16
  149 + $this->createTable('rally', [
  150 + 'rally_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  151 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  152 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  153 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  154 + 'position_according_road' => $this->text()->comment('Розташування відносно дороги (текст)'),
  155 + 'direction' => $this->text()->comment('Напрямок (текст)'),
  156 + 'fortified_length' => $this->decimal()->comment('Довжина укріплення (у метрах; з двома цифрами після коми)'),
  157 + 'layer_material_top_id' => $this->integer()->comment('Матеріал верхнього шару покриття (згідно табл. 8.1 ДБН В.2.3-4)'),
  158 + 'surface_area' => $this->decimal()->comment('Площа покриття (у квадратних метрах; з двома цифрами після коми)'),
  159 + 'road_surface_capacity' => $this->decimal()->comment('Об\'єм земляного полотна (у кубічних метрах; з двома цифрами після коми)'),
  160 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  161 + 'rally_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.17)'),
  162 + ]);
  163 + $this->addCommentOnTable('rally', 'Облікова відомість з\'їздів та виїздів');
  164 +
  165 + // Table 5.17
  166 + $this->createTable('rally_card', [
  167 + 'rally_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  168 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  169 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  170 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  171 + 'position_according_road' => $this->text()->comment('Розташування відносно дороги (текст)'),
  172 + 'direction' => $this->text()->comment('Напрямок (текст)'),
  173 + 'junction_angle' => $this->decimal()->comment('Кут примикання (в градусах; з двома цифрами після коми)'),
  174 + 'junction_rally_radius' => $this->decimal()->comment('Радіус спряження з\'їзду (у метрах; з двома цифрами після коми)'),
  175 + 'junction_exit_radius' => $this->decimal()->comment('Радіус спряження виїзду (у метрах; з двома цифрами після коми)'),
  176 + 'fortified_length' => $this->decimal()->comment('Довжина укріплення (у метрах; з двома цифрами після коми)'),
  177 + 'layer_material_top_id' => $this->integer()->comment('Матеріал верхнього шару покриття (згідно табл. 8.1 ДБН В.2.3-4)'),
  178 + 'mound_rally_begin' => $this->decimal()->comment('Насип (виїмка) на початку з\'їзду або виїзду (у метрах; з двома цифрами після коми)'),
  179 + 'mound_rally_end' => $this->decimal()->comment('Насип (виїмка) в кінці з\'їзду або виїзду (у метрах; з двома цифрами після коми)'),
  180 + 'surface_area' => $this->decimal()->comment('Площа покриття (у квадратних метрах; з двома цифрами після коми)'),
  181 + 'road_surface_capacity' => $this->decimal()->comment('Об\'єм земляного полотна (у кубічних метрах; з двома цифрами після коми)'),
  182 + 'vector_direction_x1' => $this->decimal()->comment('Координата х 1 вектору напрямку з’їзду або виїзду (з двома цифрами після коми)'),
  183 + 'vector_direction_x2' => $this->decimal()->comment('Координата х 2 вектору напрямку з’їзду або виїзду (з двома цифрами після коми)'),
  184 + 'vector_direction_y1' => $this->decimal()->comment('Координата y 1 вектору напрямку з’їзду або виїзду (з двома цифрами після коми)'),
  185 + 'vector_direction_y2' => $this->decimal()->comment('Координата y 2 вектору напрямку з’їзду або виїзду (з двома цифрами після коми)'),
  186 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  187 + 'state_indicator' => $this->integer()->comment('Показник стану (табл. Б.2 СОУ 42.1-37641918-122)'),
  188 + 'fortified_coords' => $this->string()->comment('Координати укріплення та/або покриття (геодані)'),
  189 + 'road_surface_top_coords' => $this->string()->comment('Координати верху земляного полотна (геодані)'),
  190 + 'road_surface_bottom_coords' => $this->string()->comment('Координати низу земляного полотна (геодані)'),
  191 + ]);
  192 + $this->addCommentOnTable('rally_card', 'Дані про з\'їзд або виїзд');
  193 +
  194 + // Table 5.18
  195 + $this->createTable('tunnel', [
  196 + 'tunnel_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  197 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  198 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  199 + 'center_position' => $this->string()->comment('Положення середини тунелю (псевдогеодані)'),
  200 + 'construction_length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  201 + 'cross_scheme' => $this->decimal()->comment('Поперечна схема (у метрах; з двома цифрами після коми)'),
  202 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  203 + 'height' => $this->decimal()->comment('Габарит по висоті (у метрах; з двома цифрами після коми)'),
  204 + 'width' => $this->decimal()->comment('Габарит по ширині (у метрах; з двома цифрами після коми)'),
  205 + 'sideway_width_left' => $this->decimal()->comment('Ширина тротуару ліворуч (у метрах; з двома цифрами після коми)'),
  206 + 'sideway_width_right' => $this->decimal()->comment('Ширина тротуару праворуч (у метрах; з двома цифрами після коми)'),
  207 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  208 + 'tunnel_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.19)'),
  209 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  210 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  211 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  212 + ]);
  213 + $this->addCommentOnTable('rally', 'Облікова відомість з\'їздів та виїздів');
  214 +
  215 + // Table 5.19
  216 + $this->createTable('tunnel_card', [
  217 + 'tunnel_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  218 + 'center_position' => $this->string()->comment('Положення середини споруди (псевдогеодані)'),
  219 + 'movement_direction' => $this->integer()->comment('Напрямок руху, що забезпечує споруда (згідно з [4])'),
  220 + 'nearest_settlement_name' => $this->text()->comment('Назва найближчого населеного пункту'),
  221 + 'nearest_settlement_distance' => $this->decimal()->comment('Відстань до найближчого населеного пункту (в кілометрах; з двома цифрами після коми)'),
  222 + 'state' => $this->integer()->comment('Технічний стан (згідно з [4])'),
  223 + 'lane_count_forward' => $this->integer()->comment('Кількість смуг руху в прямому напрямку руху'),
  224 + 'lane_count_back' => $this->integer()->comment('Кількість смуг руху праворуч в зворотному напрямку руху'),
  225 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  226 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  227 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  228 + 'sideway_width_forward_left' => $this->decimal()->comment('Ширина тротуару ліворуч від прямого напрямку руху (у метрах; з двома цифрами після коми)'),
  229 + 'sideway_width_forward_right' => $this->decimal()->comment('Ширина тротуару праворуч від прямого напрямку руху (у метрах; з двома цифрами після коми)'),
  230 + 'bearing_structures_long_scheme' => $this->text()->comment('Поздовжня схема несучих конструкцій по ходу кілометражу'),
  231 + 'slope_long_scheme' => $this->text()->comment('Поздовжня схема похилів'),
  232 + 'drainage_tray_internal_type' => $this->integer()->comment('Тип лотків внутрішнього водовідведення (згідно з [4])'),
  233 + 'drainage_tray_internal_length' => $this->decimal()->comment('Загальна довжина лотків внутрішнього водовідведення (у метрах; з двома цифрами після коми)'),
  234 + 'drainage_tunnel_internal_type' => $this->integer()->comment('Тип дренажних штолень внутрішнього водовідведення (згідно з [4])'),
  235 + 'drainage_tunnel_internal_length' => $this->decimal()->comment('Загальна довжина дренажних штолень внутрішнього водовідведення (у метрах; з двома цифрами після коми)'),
  236 + 'drainage_other_internal_construction' => $this->integer()->comment('Наявність інших внутрішніх водовідвідних споруд (згідно з [4])'),
  237 + 'drainage_tray_outer_type' => $this->integer()->comment('Тип лотків поверхневого водовідведення (згідно з [4])'),
  238 + 'drainage_tray_outer_length' => $this->decimal()->comment('Загальна довжина лотків поверхневого водовідведення (у метрах; з двома цифрами після коми)'),
  239 + 'drainage_tunnel_outer_type' => $this->integer()->comment('Тип нагірних канав поверхневого водовідведення (згідно з [4])'),
  240 + 'drainage_tunnel_outer_length' => $this->decimal()->comment('Загальна довжина нагірних канав поверхневого водовідведення (у метрах; з двома цифрами після коми)'),
  241 + 'drainage_other_outer_construction' => $this->integer()->comment('Наявність інших поверхневих водовідвідних споруд (згідно з [4])'),
  242 + 'fence_height' => $this->decimal()->comment('Висота огородження (у метрах; з двома цифрами після коми)'),
  243 + 'sidewalk_type_left' => $this->integer()->comment('Тип тротуару ліворуч (згідно з [4])'),
  244 + 'barrier_material_type_left' => $this->integer()->comment('Матеріал перил тротуару ліворуч (згідно з [4])'),
  245 + 'barrier_height_left' => $this->integer()->comment('Висота перил тротуару ліворуч (у метрах; з двома цифрами після коми)'),
  246 + 'sidewalk_type_right' => $this->integer()->comment('Тип тротуару праворуч (згідно з [4])'),
  247 + 'barrier_material_type_right' => $this->integer()->comment('Матеріал перил тротуару праворуч (згідно з [4])'),
  248 + 'barrier_height_right' => $this->integer()->comment('Висота перил тротуару праворуч (у метрах; з двома цифрами після коми)'),
  249 + 'roadway_material_id' => $this->integer()->comment('Матеріал покриття проїзної частини (згідно табл. 8.1 ДБН В.2.3-4)'),
  250 + 'ventilation_type_id' => $this->integer()->comment('Тип вентиляції (згідно з [4])'),
  251 + 'light_type_id' => $this->integer()->comment('Тип освітлення (згідно з [4])'),
  252 + 'antiseismic_type_id' => $this->integer()->comment('Типи антисейсмічних пристроїв (згідно з [4])'),
  253 + 'communication_type_id' => $this->integer()->comment('Тип комунікації, яка перепускається спорудою (згідно з [4])'),
  254 + 'security_connection_availability' => $this->integer()->comment('Наявність охорони та зв\'язку (згідно з [4])'),
  255 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  256 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  257 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  258 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  259 + 'tunnel_portal_card_id' => $this->integer()->comment('Оголовки (окрема облікова картка; табл. 5.20)'),
  260 + 'tunnel_body_card_id' => $this->integer()->comment('Тіло тунелю (окрема облікова картка; табл. 5.21)'),
  261 + 'sewage_card_id' => $this->integer()->comment('Очисні споруди (окрема облікова картка; табл. 5.22)'),
  262 + 'technical_doc_id' => $this->integer()->comment('Технічна документація (окрема облікова картка; табл. 5.23)'),
  263 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  264 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  265 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  266 + 'tunnel_outline_coords' => $this->string()->comment('Координати контуру тунелю в межах проїзної частини (по окремим напрямкам руху) (геодані)'),
  267 + ]);
  268 + $this->addCommentOnTable('tunnel_card', 'Дані про тунель');
  269 +
  270 + // Table 5.20
  271 + $this->createTable('tunnel_portal_card', [
  272 + 'tunnel_portal_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  273 + 'purpose' => $this->text()->comment('Призначення порталу'),
  274 + 'tunnel_portal_type_id' => $this->integer()->comment('Тип порталу (згідно з [4])'),
  275 + 'thick' => $this->decimal()->comment('Товщина (у метрах; з двома цифрами після коми)'),
  276 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  277 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  278 + 'frame_material_id' => $this->integer()->comment('Матеріал оправи порталу (згідно з [4])'),
  279 + 'frame_capacity' => $this->decimal()->comment('Об\'єм оправи порталу (у кубічних метрах; з двома цифрами після коми)'),
  280 + 'another_first_type_material_id' => $this->integer()->comment('Матеріал інших елементів порталу 1-го типу (згідно з [4])'),
  281 + 'another_first_type_capacity' => $this->decimal()->comment('Об\'єм інших елементів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  282 + 'another_second_type_material_id' => $this->integer()->comment('Матеріал інших елементів порталу 2-го типу (згідно з [4])'),
  283 + 'another_second_type_capacity' => $this->decimal()->comment('Об\'єм інших елементів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  284 + 'another_third_type_material_id' => $this->integer()->comment('Матеріал інших елементів порталу 3-го типу (згідно з [4])'),
  285 + 'another_third_type_capacity' => $this->decimal()->comment('Об\'єм інших елементів 3-го типу (у кубічних метрах; з двома цифрами після коми)'),
  286 + 'foundation_depth' => $this->decimal()->comment('Глибина залягання фундаменту (у метрах; з двома цифрами після коми)'),
  287 + 'foundation_first_type_material_id' => $this->integer()->comment('Матеріал фундаменту 1-го типу (згідно з [4])'),
  288 + 'foundation_second_type_material_id' => $this->integer()->comment('Матеріал фундаменту 2-го типу (згідно з [4])'),
  289 + 'foundation_third_type_material_id' => $this->integer()->comment('Матеріал фундаменту 3-го типу (згідно з [4])'),
  290 + 'basement_material_id' => $this->integer()->comment('Матеріал основи (згідно з [4])'),
  291 + 'foundation_basement_capacity' => $this->decimal()->comment('Загальний об\'єм фундаменту та основи (у кубічних метрах; з двома цифрами після коми)'),
  292 + 'fortified_slope_material_id' => $this->integer()->comment('Матеріал укріплення укосів (згідно з [4])'),
  293 + ]);
  294 + $this->addCommentOnTable('tunnel_portal_card', 'Дані про портал тунелю');
  295 +
  296 + // Table 5.21
  297 + $this->createTable('tunnel_body_card', [
  298 + 'tunnel_body_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  299 + 'body_type_id' => $this->integer()->comment('Тип форми тіла (згідно з [4])'),
  300 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  301 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  302 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  303 + 'typical_project_id' => $this->integer()->comment('Типовий проект (згідно з [4])'),
  304 + 'body_material_id' => $this->integer()->comment('Матеріал тіла тунелю (згідно з [4])'),
  305 + 'carrier_type_id' => $this->integer()->comment('Тип елементів носіїв (згідно з [4])'),
  306 + 'arch_rings_reverse_count' => $this->integer()->comment('Кількість кілець із зворотнім склепінням'),
  307 + 'rings_another_count' => $this->integer()->comment('Кількість кілець без зворотних склепінь та розпірних плит'),
  308 + 'precast_plates_rings_count' => $this->integer()->comment('Кількість кілець із розпірними плитами'),
  309 + 'body_material_capacity' => $this->decimal()->comment('Об\'єм матеріалу тіла (у кубічних метрах; з двома цифрами після коми)'),
  310 + 'foundation_material_id' => $this->integer()->comment('Матеріал фундаменту (згідно з [4])'),
  311 + 'basement_material_id' => $this->integer()->comment('Матеріал основи (згідно з [4])'),
  312 + 'foundation_basement_capacity' => $this->decimal()->comment('Загальний об\'єм фундаменту та основи (у кубічних метрах; з двома цифрами після коми)'),
  313 + ]);
  314 + $this->addCommentOnTable('tunnel_body_card', 'Дані про тіло тунелю');
  315 +
  316 + // Table 5.22
  317 + $this->createTable('sewage_card', [
  318 + 'sewage_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  319 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  320 + 'location' => $this->text()->comment('Місце розташування'),
  321 + 'drainage_scheme_outer' => $this->integer()->comment('Схема організації поверхневого водовідведення (згідно з [4])'),
  322 + 'sewage_construction_type_id' => $this->integer()->comment('Тип очисної споруди (згідно з [4])'),
  323 + 'capacity_project' => $this->decimal()->comment('Проектна пропускна здатність (у кубічних метрах за секунду; з двома цифрами після коми)'),
  324 + 'capacity_fact' => $this->decimal()->comment('Фактична пропускна здатність (у кубічних метрах за секунду; з двома цифрами після коми)'),
  325 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  326 + 'technical_doc_id' => $this->integer()->comment('Назва технічної документації (згідно з [4])'),
  327 + 'technical_doc_location' => $this->text()->comment('Місце зберігання технічної документації'),
  328 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  329 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  330 + 'project_organization' => $this->text()->comment('Проектна організація'),
  331 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  332 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  333 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  334 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  335 + ]);
  336 + $this->addCommentOnTable('sewage_card', 'Дані про очисну споруду');
  337 +
  338 + // Table 5.23
  339 + $this->createTable('technical_doc', [
  340 + 'technical_doc_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  341 + 'name' => $this->text()->comment('Назва документу'),
  342 + 'date_add' => $this->integer()->comment('Дата документу (згідно з [4])'),
  343 + 'performer' => $this->text()->comment('Виконавець'),
  344 + 'location' => $this->text()->comment('Місце зберігання документу'),
  345 + ]);
  346 + $this->addCommentOnTable('technical_doc', 'Дані про технічну документацію');
  347 +
  348 + // Table 5.24
  349 + $this->createTable('bridge', [
  350 + 'bridge_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  351 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  352 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  353 + 'center_position' => $this->string()->comment('Положення середини споруди (псевдогеодані)'),
  354 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  355 + 'obstacle_type_id' => $this->integer()->comment('Вид перешкоди (згідно з [4])'),
  356 + 'long_scheme' => $this->text()->comment('Поздовжня схема'),
  357 + 'cross_scheme' => $this->text()->comment('Поперечна схема'),
  358 + 'construction_length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  359 + 'material_id' => $this->integer()->comment('Матеріал споруди (згідно з [4])'),
  360 + 'height' => $this->decimal()->comment('Габарит по висоті (у метрах; з двома цифрами після коми)'),
  361 + 'width' => $this->decimal()->comment('Габарит по ширині (у метрах; з двома цифрами після коми)'),
  362 + 'sideway_width_left' => $this->decimal()->comment('Ширина тротуару ліворуч (у метрах; з двома цифрами після коми)'),
  363 + 'sideway_width_right' => $this->decimal()->comment('Ширина тротуару праворуч (у метрах; з двома цифрами після коми)'),
  364 + 'load' => $this->decimal()->comment('Вантажопідйомність (згідно з ДБН В.2.3-22)'),
  365 + 'load_additional' => $this->text()->comment('Додаткове навантаження'),
  366 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  367 + 'bridge_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.25)'),
  368 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  369 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  370 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  371 + ]);
  372 + $this->addCommentOnTable('rally', 'Облікова відомість мостів');
  373 +
  374 + // Table 5.25
  375 + $this->createTable('bridge_card', [
  376 + 'bridge_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  377 + 'center_position' => $this->string()->comment('Положення середини споруди (псевдогеодані)'),
  378 + 'movement_direction' => $this->integer()->comment('Напрямок руху, що забезпечує споруда (згідно з [4])'),
  379 + 'year_build' => $this->text()->comment('Рік побудови'),
  380 + 'year_reconstruction' => $this->text()->comment('Рік реконструкції'),
  381 + 'nearest_settlement_name' => $this->text()->comment('Назва найближчого населеного пункту'),
  382 + 'nearest_settlement_distance' => $this->decimal()->comment('Відстань до найближчого населеного пункту (в кілометрах; з двома цифрами після коми)'),
  383 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  384 + 'load' => $this->decimal()->comment('Вантажопідйомність (згідно з ДБН В.2.3-22)'),
  385 + 'load_additional' => $this->text()->comment('Додаткове навантаження'),
  386 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  387 + 'obstacle_type_id' => $this->integer()->comment('Вид перешкоди (згідно з [4])'),
  388 + 'obstacle_name' => $this->text()->comment('Власна назва перешкоди'),
  389 + 'watercourse_rmv_width' => $this->decimal()->comment('Ширина водотоку по дзеркалу РМВ (у метрах; з двома цифрами після коми)'),
  390 + 'flow_rmv_speed' => $this->decimal()->comment('Швидкість течії при РМВ (у метрах на секунду; з двома цифрами після коми)'),
  391 + 'watercourse_rvv_width' => $this->decimal()->comment('Ширина водотоку по дзеркалу РВВ (у метрах; з двома цифрами після коми)'),
  392 + 'flow_km_direction' => $this->integer()->comment('Напрямок течії по ходу кілометражу (згідно з [4])'),
  393 + 'road_category_id' => $this->integer()->comment('Категорія автомобільної дороги (згідно з [4])'),
  394 + 'rail_track_count' => $this->integer()->comment('Кількість колій залізниці'),
  395 + 'obstacle_top_width' => $this->decimal()->comment('Ширина земляного полотна перешкоди по верху (у метрах; з двома цифрами після коми)'),
  396 + 'cross_angle' => $this->decimal()->comment('Кут перетину (в градусах; з двома цифрами після коми)'),
  397 + 'overall_dimension' => $this->decimal()->comment('Габарит (у метрах; з двома цифрами після коми)'),
  398 + 'lane_count_forward' => $this->integer()->comment('Кількість смуг руху в прямому напрямку руху'),
  399 + 'lane_count_back' => $this->integer()->comment('Кількість смуг руху праворуч в зворотному напрямку руху'),
  400 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  401 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  402 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  403 + 'sideway_width_forward_left' => $this->decimal()->comment('Ширина тротуару ліворуч від прямого напрямку руху (у метрах; з двома цифрами після коми)'),
  404 + 'sideway_width_forward_right' => $this->decimal()->comment('Ширина тротуару праворуч від прямого напрямку руху (у метрах; з двома цифрами після коми)'),
  405 + 'bridge_under_height' => $this->decimal()->comment('Висота підмостового габариту (у метрах; з двома цифрами після коми)'),
  406 + 'bridge_under_width' => $this->decimal()->comment('Ширина підмостового габариту (у метрах; з двома цифрами після коми)'),
  407 + 'bridge_hole' => $this->decimal()->comment('Отвір моста (у метрах; з двома цифрами після коми)'),
  408 + 'span_long_scheme' => $this->text()->comment('Поздовжня схема прогонових будов по ходу кілометражу'),
  409 + 'slope_long_scheme' => $this->text()->comment('Поздовжня схема похилів'),
  410 + 'fence_construction_right_id' => $this->integer()->comment('Конструкція огородження праворуч (згідно з [4])'),
  411 + 'fence_height_right' => $this->decimal()->comment('Висота огородження праворуч (у метрах; з двома цифрами після коми)'),
  412 + 'fence_construction_left_id' => $this->integer()->comment('Конструкція огородження ліворуч (згідно з [4])'),
  413 + 'fence_height_left' => $this->decimal()->comment('Висота огородження ліворуч (у метрах; з двома цифрами після коми)'),
  414 + 'sidewalk_type_left' => $this->integer()->comment('Тип тротуару ліворуч (згідно з [4])'),
  415 + 'barrier_material_type_left' => $this->integer()->comment('Матеріал перил тротуару ліворуч (згідно з [4])'),
  416 + 'barrier_height_left' => $this->integer()->comment('Висота перил тротуару ліворуч (у метрах; з двома цифрами після коми)'),
  417 + 'sidewalk_type_right' => $this->integer()->comment('Тип тротуару праворуч (згідно з [4])'),
  418 + 'barrier_material_type_right' => $this->integer()->comment('Матеріал перил тротуару праворуч (згідно з [4])'),
  419 + 'barrier_height_right' => $this->integer()->comment('Висота перил тротуару праворуч (у метрах; з двома цифрами після коми)'),
  420 + 'roadway_material_id' => $this->integer()->comment('Матеріал верхнього шару покриття проїзної частини (згідно табл. 8.1 ДБН В.2.3-4)'),
  421 + 'antiseismic_type_id' => $this->integer()->comment('Типи антисейсмічних пристроїв (згідно з [4])'),
  422 + 'deformation_joint_type_id' => $this->integer()->comment('Типи деформаційних швів (згідно з [4])'),
  423 + 'communication_type_id' => $this->integer()->comment('Тип комунікації, яка перепускається спорудою (згідно з [4])'),
  424 + 'drainage_type_id' => $this->integer()->comment('Тип водовідведення (згідно з [4])'),
  425 + 'drainage_tray_length' => $this->decimal()->comment('Загальна довжина лотків зливової каналізації (у метрах; з двома цифрами після коми)'),
  426 + 'regulatory_structure_left' => $this->integer()->comment('Регуляційні споруди лівобережні (згідно з [4])'),
  427 + 'regulatory_structure_right' => $this->integer()->comment('Регуляційні споруди правобережні (згідно з [4])'),
  428 + 'security_connection_availability' => $this->integer()->comment('Наявність охорони та зв\'язку (згідно з [4])'),
  429 + 'light_availability' => $this->integer()->comment('Наявність освітлення (згідно з [4])'),
  430 + 'inventory_device_availability' => $this->integer()->comment('Наявність інвентарних пристроїв для огляду та ремонту (згідно з [4])'),
  431 + 'stair_availability_begin_left' => $this->integer()->comment('Наявність сходів на початку споруди ліворуч (згідно з [4])'),
  432 + 'stair_availability_begin_right' => $this->integer()->comment('Наявність сходів на початку споруди праворуч (згідно з [4])'),
  433 + 'stair_availability_end_left' => $this->integer()->comment('Наявність сходів в кінці споруди ліворуч (згідно з [4])'),
  434 + 'stair_availability_end_right' => $this->integer()->comment('Наявність сходів в кінці споруди праворуч (згідно з [4])'),
  435 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  436 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  437 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  438 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  439 + 'project_organization' => $this->text()->comment('Проектна організація'),
  440 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  441 + 'purlin_card_id' => $this->integer()->comment('Прогони (окрема облікова картка; табл. 5.26)'),
  442 + 'pillar_card_id' => $this->integer()->comment('Опори (окрема облікова картка; табл. 5.27)'),
  443 + 'sewage_card_id' => $this->integer()->comment('Очисні споруди (окрема облікова картка; табл. 5.22)'),
  444 + 'technical_doc_id' => $this->integer()->comment('Технічна документація (окрема облікова картка; табл. 5.23)'),
  445 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  446 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  447 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  448 + 'bridge_outline_coords' => $this->string()->comment('Координати контуру споруди в межах проїзної частини (по окремим напрямкам руху) (геодані)'),
  449 + ]);
  450 + $this->addCommentOnTable('bridge_card', 'Дані про міст');
  451 +
  452 + // Table 5.26
  453 + $this->createTable('purlin_card', [
  454 + 'purlin_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  455 + 'purlin_number' => $this->integer()->comment('Номер прогону'),
  456 + 'static_scheme' => $this->text()->comment('Статична схема'),
  457 + 'span_count' => $this->integer()->comment('Кількість прогонових будов в прогоні'),
  458 + 'span_same_numbers' => $this->text()->comment('Номери однакових прогонових будов в прогоні (ліворуч направо)'),
  459 + 'span_construction_type_id' => $this->integer()->comment('Тип конструкції прогонової будови (згідно з [4])'),
  460 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  461 + 'span_length' => $this->decimal()->comment('Повна довжина прогонової будови (у метрах; з двома цифрами після коми)'),
  462 + 'year_build' => $this->text()->comment('Рік виготовлення'),
  463 + 'load' => $this->integer()->comment('Проектне навантаження (згідно з [4])'),
  464 + 'typical_project_id' => $this->integer()->comment('Типовий проект (згідно з [4])'),
  465 + 'bearing_moving_type_id' => $this->integer()->comment('Типи рухомих опорних частин (згідно з [4])'),
  466 + 'bearing_not_moving_type_id' => $this->integer()->comment('Типи нерухомих опорних частин (згідно з [4])'),
  467 + 'cross_scheme' => $this->text()->comment('Поперечна схема'),
  468 + 'cross_joint_type_id' => $this->integer()->comment('Спосіб поперечного об\'єднання (згідно з [4])'),
  469 + 'girder_main_count' => $this->integer()->comment('Кількість головних балок'),
  470 + 'girder_main_center_height' => $this->decimal()->comment('Висота головної балки в центрі прогону (у метрах; з двома цифрами після коми)'),
  471 + 'girder_main_pillar_height' => $this->decimal()->comment('Висота головної балки на опорі (у метрах; з двома цифрами після коми)'),
  472 + 'girder_cross_count' => $this->integer()->comment('Кількість поперечних балок (діафрагм) в прогоні'),
  473 + 'girder_long_count' => $this->integer()->comment('Кількість поздовжніх балок у панелі'),
  474 + 'roadway_plate_thick' => $this->decimal()->comment('Товщина плити проїзної частини (в міліметрах; з двома цифрами після коми)'),
  475 + 'road_surface_thick' => $this->decimal()->comment('Товщина одягу проїзної частини (в міліметрах; з двома цифрами після коми)'),
  476 + 'load_additional' => $this->text()->comment('Додаткове навантаження'),
  477 + 'note' => $this->text()->comment('Примітки'),
  478 + ]);
  479 + $this->addCommentOnTable('purlin_card', 'Дані про прогін');
  480 +
  481 + // Table 5.27
  482 + $this->createTable('pillar_card', [
  483 + 'pillar_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  484 + 'pillar_same_numbers' => $this->text()->comment('Номери однакових опор (ціле число або їх сукупність)'),
  485 + 'pillar_construction_type_id' => $this->integer()->comment('Тип конструкції опори (згідно з [4])'),
  486 + 'total_height' => $this->decimal()->comment('Загальна висота опори (у метрах; з двома цифрами після коми)'),
  487 + 'massive_height' => $this->decimal()->comment('Висота масивної частини опори (у метрах; з двома цифрами після коми)'),
  488 + 'massive_width' => $this->decimal()->comment('Ширина масивної частини опори (у метрах; з двома цифрами після коми)'),
  489 + 'stud_count' => $this->integer()->comment('Кількість стояків'),
  490 + 'stud_cut' => $this->decimal()->comment('Переріз стояка (у метрах; з двома цифрами після коми)'),
  491 + 'bar_cut' => $this->decimal()->comment('Переріз ригеля (у метрах; з двома цифрами після коми)'),
  492 + 'bar_length' => $this->decimal()->comment('Переріз ригеля (у метрах; з двома цифрами після коми)'),
  493 + 'pile_count' => $this->integer()->comment('Кількість паль'),
  494 + 'pile_cut' => $this->decimal()->comment('Переріз паль (у метрах; з двома цифрами після коми)'),
  495 + 'material_id' => $this->integer()->comment('Матеріал опори (згідно з [4])'),
  496 + 'foundation_type__id' => $this->integer()->comment('Тип фундаменту (згідно з [4])'),
  497 + 'foundation_depth' => $this->decimal()->comment('Глибина закладання фундаменту (у метрах; з двома цифрами після коми)'),
  498 + 'fortified_conus_material_id' => $this->integer()->comment('Матеріал укріплення конусу (згідно з [4])'),
  499 + 'icebreaker_type_id' => $this->integer()->comment('Тип льодорізу (згідно з [4])'),
  500 + 'icebreaker_material_id' => $this->integer()->comment('Матеріал льодорізу (згідно з [4])'),
  501 + ]);
  502 + $this->addCommentOnTable('pillar_card', 'Дані про опору');
  503 +
  504 + // Table 5.28
  505 + $this->createTable('underground_crossing', [
  506 + 'underground_crossing_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  507 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  508 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  509 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  510 + 'length' => $this->decimal()->comment('Довжина підземної частини споруди (у метрах; з двома цифрами після коми)'),
  511 + 'cross_scheme' => $this->text()->comment('Поперечна схема'),
  512 + 'material_id' => $this->integer()->comment('Матеріал споруди (згідно з [4])'),
  513 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  514 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  515 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  516 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  517 + 'underground_crossing_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.29)'),
  518 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  519 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  520 + ]);
  521 + $this->addCommentOnTable('underground_crossing', 'Облікова відомість підземних пішохідних переходів');
  522 +
  523 + // Table 5.29
  524 + $this->createTable('underground_crossing_card', [
  525 + 'underground_crossing_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  526 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  527 + 'nearest_settlement_name' => $this->text()->comment('Назва найближчого населеного пункту'),
  528 + 'nearest_settlement_distance' => $this->decimal()->comment('Відстань до найближчого населеного пункту (в кілометрах; з двома цифрами після коми)'),
  529 + 'state' => $this->integer()->comment('Технічний стан (згідно з [4])'),
  530 + 'length' => $this->decimal()->comment('Довжина підземної частини споруди (у метрах; з двома цифрами після коми)'),
  531 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  532 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  533 + 'slope_long_scheme' => $this->text()->comment('Поздовжня схема похилів'),
  534 + 'mound_height' => $this->decimal()->comment('Висота насипу над переходом (у метрах; з двома цифрами після коми)'),
  535 + 'stair_total_length' => $this->decimal()->comment('Загальна довжина сходів на вході та виході з підземного переходу (у метрах; з двома цифрами після коми)'),
  536 + 'drainage_tray_internal_type' => $this->integer()->comment('Тип лотків внутрішнього водовідведення (згідно з [4])'),
  537 + 'drainage_tray_internal_length' => $this->decimal()->comment('Загальна довжина лотків внутрішнього водовідведення (у метрах; з двома цифрами після коми)'),
  538 + 'drainage_tunnel_type' => $this->integer()->comment('Тип дренажних штолень (згідно з [4])'),
  539 + 'drainage_tunnel_length' => $this->decimal()->comment('Загальна довжина дренажних штолень (у метрах; з двома цифрами після коми)'),
  540 + 'drainage_other_internal_construction' => $this->integer()->comment('Наявність інших внутрішніх водовідвідних споруд (згідно з [4])'),
  541 + 'surface_material_id' => $this->integer()->comment('Матеріал покриття (згідно з [4])'),
  542 + 'ventilation_type_id' => $this->integer()->comment('Тип вентиляції (згідно з [4])'),
  543 + 'light_type_id' => $this->integer()->comment('Тип освітлення (згідно з [4])'),
  544 + 'antiseismic_type_id' => $this->integer()->comment('Типи антисейсмічних пристроїв (згідно з [4])'),
  545 + 'communication_type_id' => $this->integer()->comment('Тип комунікації, яка перепускається спорудою (згідно з [4])'),
  546 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  547 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  548 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  549 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  550 + 'underground_crossing_portal_card_id' => $this->integer()->comment('Портали (окрема облікова картка; табл. 5.30)'),
  551 + 'underground_crossing_body_card_id' => $this->integer()->comment('Тіло тунелю (окрема облікова картка; табл. 5.31)'),
  552 + 'underground_crossing_add_on_card_id' => $this->integer()->comment('Надбудова (окрема облікова картка; табл. 5.32)'),
  553 + 'technical_doc_id' => $this->integer()->comment('Технічна документація (окрема облікова картка; табл. 5.23)'),
  554 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  555 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  556 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  557 + 'underground_crossing_outline_coords' => $this->string()->comment('Координати контуру споруди в межах зони пішохідного руху (геодані)'),
  558 + ]);
  559 + $this->addCommentOnTable('underground_crossing_card', 'Дані про підземний пішохідний перехід');
  560 +
  561 + // Table 5.30
  562 + $this->createTable('underground_crossing_portal_card', [
  563 + 'underground_crossing_portal_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  564 + 'header_location' => $this->text()->comment('Розташування оголовку'),
  565 + 'underground_crossing_portal_type_id' => $this->integer()->comment('Тип порталу (згідно з [4])'),
  566 + 'thick' => $this->decimal()->comment('Товщина (у метрах; з двома цифрами після коми)'),
  567 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  568 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  569 + 'frame_material_id' => $this->integer()->comment('Матеріал оправи порталу (згідно з [4])'),
  570 + 'frame_capacity' => $this->decimal()->comment('Об\'єм оправи порталу (у кубічних метрах; з двома цифрами після коми)'),
  571 + 'another_first_type_material_id' => $this->integer()->comment('Матеріал інших елементів порталу 1-го типу (згідно з [4])'),
  572 + 'another_first_type_capacity' => $this->decimal()->comment('Об\'єм інших елементів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  573 + 'another_second_type_material_id' => $this->integer()->comment('Матеріал інших елементів порталу 2-го типу (згідно з [4])'),
  574 + 'another_second_type_capacity' => $this->decimal()->comment('Об\'єм інших елементів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  575 + 'another_third_type_material_id' => $this->integer()->comment('Матеріал інших елементів порталу 3-го типу (згідно з [4])'),
  576 + 'another_third_type_capacity' => $this->decimal()->comment('Об\'єм інших елементів 3-го типу (у кубічних метрах; з двома цифрами після коми)'),
  577 + 'basement_material_id' => $this->integer()->comment('Матеріал основи (згідно з [4])'),
  578 + 'foundation_basement_capacity' => $this->decimal()->comment('Загальний об\'єм фундаменту та основи (у кубічних метрах; з двома цифрами після коми)'),
  579 + 'fortified_slope_material_id' => $this->integer()->comment('Матеріал укріплення укосів (згідно з [4])'),
  580 + ]);
  581 + $this->addCommentOnTable('underground_crossing_portal_card', 'Дані про портал підземного пішохідного переходу');
  582 +
  583 + // Table 5.31
  584 + $this->createTable('underground_crossing_body_card', [
  585 + 'underground_crossing_body_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  586 + 'body_type_id' => $this->integer()->comment('Тип форми тіла (згідно з [4])'),
  587 + 'thick' => $this->decimal()->comment('Товщина (у метрах; з двома цифрами після коми)'),
  588 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  589 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  590 + 'typical_project_id' => $this->integer()->comment('Типовий проект (згідно з [4])'),
  591 + 'body_material_id' => $this->integer()->comment('Матеріал стінової будови (згідно з [4])'),
  592 + 'body_material_capacity' => $this->decimal()->comment('Об\'єм матеріалу стінової будови (у кубічних метрах; з двома цифрами після коми)'),
  593 + 'overlap_type_id' => $this->integer()->comment('Тип конструкцій перекриття (згідно з [4])'),
  594 + 'overlap_material_id' => $this->integer()->comment('Матеріал конструкцій перекриття (згідно з [4])'),
  595 + 'overlap_material_capacity' => $this->decimal()->comment('Об\'єм матеріалу конструкцій перекриття (у кубічних метрах; з двома цифрами після коми)'),
  596 + 'foundation_material_id' => $this->integer()->comment('Матеріал фундаменту (згідно з [4])'),
  597 + 'basement_material_id' => $this->integer()->comment('Матеріал основи (згідно з [4])'),
  598 + 'foundation_basement_capacity' => $this->decimal()->comment('Загальний об\'єм фундаменту та основи (у кубічних метрах; з двома цифрами після коми)'),
  599 + ]);
  600 + $this->addCommentOnTable('underground_crossing_body_card', 'Дані про тіло підземного пішохідного переходу');
  601 +
  602 + // Table 5.32
  603 + $this->createTable('underground_crossing_add_on_card', [
  604 + 'underground_crossing_add_on_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  605 + 'location' => $this->text()->comment('Розташування надбудови'),
  606 + 'thick' => $this->decimal()->comment('Товщина (у метрах; з двома цифрами після коми)'),
  607 + 'height' => $this->decimal()->comment('Висота (у метрах; з двома цифрами після коми)'),
  608 + 'width' => $this->decimal()->comment('Ширина (у метрах; з двома цифрами після коми)'),
  609 + 'wall_material_id' => $this->integer()->comment('Матеріал стін (згідно з [4])'),
  610 + 'roof_material_id' => $this->integer()->comment('Матеріал даху (згідно з [4])'),
  611 + 'wall_material_capacity' => $this->decimal()->comment('Об\'єм матеріалу стін (у кубічних метрах; з двома цифрами після коми)'),
  612 + 'roof_material_capacity' => $this->decimal()->comment('Об\'єм матеріалу даху (у кубічних метрах; з двома цифрами після коми)'),
  613 + 'first_add_on_coords' => $this->string()->comment('Координати 1-ї надбудови (геодані)'),
  614 + 'second_add_on_coords' => $this->string()->comment('Координати 2-ї надбудови (геодані)'),
  615 + ]);
  616 + $this->addCommentOnTable('underground_crossing_add_on_card', 'Дані про надбудови підземного пішохідного переходу');
  617 +
  618 + // Table 5.33
  619 + $this->createTable('overground_crossing', [
  620 + 'overground_crossing_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  621 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  622 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  623 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  624 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  625 + 'long_scheme' => $this->text()->comment('Поздовжня схема'),
  626 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  627 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  628 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  629 + 'add_on_availability' => $this->integer()->comment('Наявність надбудов (згідно з [4])'),
  630 + 'lift_availability' => $this->integer()->comment('Наявність пандусів, механічних підйомників на вході та виході із споруди (згідно з [4])'),
  631 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  632 + 'overground_crossing_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.34)'),
  633 + 'stair_total_length' => $this->decimal()->comment('Загальна довжина сходів на підході до споруди (у метрах; з двома цифрами після коми)'),
  634 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  635 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  636 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  637 + ]);
  638 + $this->addCommentOnTable('overground_crossing', 'Облікова відомість надземних пішохідних переходів');
  639 +
  640 + // Table 5.34
  641 + $this->createTable('overground_crossing_card', [
  642 + 'overground_crossing_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  643 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  644 + 'year_build' => $this->text()->comment('Рік побудови'),
  645 + 'year_reconstruction' => $this->text()->comment('Рік реконструкції'),
  646 + 'nearest_settlement_name' => $this->text()->comment('Назва найближчого населеного пункту'),
  647 + 'nearest_settlement_distance' => $this->decimal()->comment('Відстань до найближчого населеного пункту (в кілометрах; з двома цифрами після коми)'),
  648 + 'load_project' => $this->decimal()->comment('Проектне навантаження (в кілометрах; з двома цифрами після коми)'),
  649 + 'load_fact' => $this->decimal()->comment('Фактичне навантаження (в кілометрах; з двома цифрами після коми)'),
  650 + 'state' => $this->integer()->comment('Технічний стан (згідно з [4])'),
  651 + 'roadway_width' => $this->decimal()->comment('Ширина автомобільної дороги по верху земляного полотна (у метрах; з двома цифрами після коми)'),
  652 + 'cross_angle' => $this->decimal()->comment('Кут перетину (в градусах; з двома цифрами після коми)'),
  653 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  654 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  655 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  656 + 'bridge_under_height' => $this->decimal()->comment('Висота підмостового габариту (у метрах; з двома цифрами після коми)'),
  657 + 'bridge_under_width' => $this->decimal()->comment('Ширина підмостового габариту (у метрах; з двома цифрами після коми)'),
  658 + 'bridge_hole' => $this->decimal()->comment('Отвір моста (у метрах; з двома цифрами після коми)'),
  659 + 'bearing_structures_long_scheme' => $this->text()->comment('Поздовжня схема несучих конструкцій ліворуч направо по ходу прямого напрямку руху'),
  660 + 'slope_long_scheme' => $this->text()->comment('Поздовжня схема похилів'),
  661 + 'barrier_material_type_id' => $this->integer()->comment('Матеріал перил (згідно з [4])'),
  662 + 'barrier_height' => $this->integer()->comment('Висота перил (у метрах; з двома цифрами після коми)'),
  663 + 'surface_material_id' => $this->integer()->comment('Покриття пішохідної частини'),
  664 + 'antiseismic_type_id' => $this->integer()->comment('Типи антисейсмічних пристроїв (згідно з [4])'),
  665 + 'deformation_joint_type_id' => $this->integer()->comment('Типи деформаційних швів (згідно з [4])'),
  666 + 'communication_type_id' => $this->integer()->comment('Тип комунікації, яка перепускається спорудою (згідно з [4])'),
  667 + 'drainage_type_id' => $this->integer()->comment('Тип водовідведення (згідно з [4])'),
  668 + 'drainage_tray_length' => $this->decimal()->comment('Загальна довжина лотків зливової каналізації (у метрах; з двома цифрами після коми)'),
  669 + 'drainage_collector_length' => $this->decimal()->comment('Загальна довжина колекторів зливової каналізації (у метрах; з двома цифрами після коми)'),
  670 + 'approach_left' => $this->integer()->comment('Споруди підходів ліворуч (згідно з [4])'),
  671 + 'approach_right' => $this->integer()->comment('Споруди підходів праворуч (згідно з [4])'),
  672 + 'add_on_availability' => $this->integer()->comment('Надбудова (згідно з [4])'),
  673 + 'light_availability' => $this->integer()->comment('Наявність штучного освітлення (згідно з [4])'),
  674 + 'inventory_device_availability' => $this->integer()->comment('Наявність інвентарних пристроїв для огляду та ремонту (згідно з [4])'),
  675 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  676 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  677 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  678 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  679 + 'project_organization' => $this->text()->comment('Проектна організація'),
  680 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  681 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  682 + 'purlin_card_id' => $this->integer()->comment('Прогони (окрема облікова картка; табл. 5.26)'),
  683 + 'pillar_card_id' => $this->integer()->comment('Опори (окрема облікова картка; табл. 5.27)'),
  684 + 'approach_card_id' => $this->integer()->comment('Підходи (окрема облікова картка; табл. 5.35)'),
  685 + 'sewage_card_id' => $this->integer()->comment('Очисні споруди (окрема облікова картка; табл. 5.22)'),
  686 + 'technical_doc_id' => $this->integer()->comment('Технічна документація (окрема облікова картка; табл. 5.23)'),
  687 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  688 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  689 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  690 + 'overground_crossing_outline_coords' => $this->string()->comment('Координати контуру споруди в межах пішохідної зони (геодані)'),
  691 + ]);
  692 + $this->addCommentOnTable('overground_crossing_card', 'Дані про надземний пішохідний перехід');
  693 +
  694 + // Table 5.35
  695 + $this->createTable('overground_crossing_approach_card', [
  696 + 'overground_crossing_approach_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  697 + 'location' => $this->text()->comment('Розташування споруди'),
  698 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  699 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  700 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  701 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  702 + 'another_first_type_material_id' => $this->integer()->comment('Матеріал споруди 1-го типу (згідно з [4])'),
  703 + 'another_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  704 + 'another_second_type_material_id' => $this->integer()->comment('Матеріал споруди 2-го типу (згідно з [4])'),
  705 + 'another_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  706 + 'another_third_type_material_id' => $this->integer()->comment('Матеріал споруди 3-го типу (згідно з [4])'),
  707 + 'another_third_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 3-го типу (у кубічних метрах; з двома цифрами після коми)'),
  708 + 'related_lift_construction_left_type_id' => $this->integer()->comment('Тип супутніх підйомних споруд ліворуч (згідно з [4])'),
  709 + 'related_lift_construction_right_type_id' => $this->integer()->comment('Тип супутніх підйомних споруд праворуч (згідно з [4])'),
  710 + 'construction_coords_left' => $this->string()->comment('Координати споруди ліворуч (геодані)'),
  711 + 'construction_coords_right' => $this->string()->comment('Координати споруди праворуч (геодані)'),
  712 + ]);
  713 + $this->addCommentOnTable('overground_crossing_approach_card', 'Дані про підходи до надземного пішохідного переходу');
  714 +
  715 + // Table 5.36
  716 + $this->createTable('sel_protection', [
  717 + 'sel_protection_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  718 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  719 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  720 + 'position' => $this->string()->comment('Положення предмета захисту (псевдогеодані)'),
  721 + 'road_distance' => $this->decimal()->comment('Відстань від дороги (у метрах; з двома цифрами після коми)'),
  722 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  723 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  724 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  725 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  726 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  727 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  728 + 'sel_protection_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.37)'),
  729 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  730 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  731 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  732 + ]);
  733 + $this->addCommentOnTable('sel_protection', 'Облікова відомість селезахисних споруд');
  734 +
  735 + // Table 5.37
  736 + $this->createTable('sel_protection_card', [
  737 + 'sel_protection_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  738 + 'location' => $this->text()->comment('Розташування споруди'),
  739 + 'position' => $this->string()->comment('Положення предмета захисту (псевдогеодані)'),
  740 + 'protection_object_id' => $this->integer()->comment('Предмет захисту (згідно з [4])'),
  741 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  742 + 'road_distance' => $this->decimal()->comment('Відстань від дороги (у метрах; з двома цифрами після коми)'),
  743 + 'year_build' => $this->text()->comment('Рік побудови'),
  744 + 'year_reconstruction' => $this->text()->comment('Рік реконструкції'),
  745 + 'nearest_settlement_name' => $this->text()->comment('Назва найближчого населеного пункту'),
  746 + 'nearest_settlement_distance' => $this->decimal()->comment('Відстань до найближчого населеного пункту (в кілометрах; з двома цифрами після коми)'),
  747 + 'load_project' => $this->decimal()->comment('Проектне навантаження (в тоннах; з двома цифрами після коми)'),
  748 + 'load_fact' => $this->decimal()->comment('Фактичне навантаження (в тоннах; з двома цифрами після коми)'),
  749 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  750 + 'thalweg_type_id' => $this->integer()->comment('Тип тальвегу (згідно з [4])'),
  751 + 'watercourse_rmv_width' => $this->decimal()->comment('Ширина водотоку по дзеркалу РМВ (у метрах; з двома цифрами після коми)'),
  752 + 'flow_rmv_speed' => $this->decimal()->comment('Швидкість течії при РМВ (у метрах на секунду; з двома цифрами після коми)'),
  753 + 'watercourse_rvv_width' => $this->decimal()->comment('Ширина водотоку по дзеркалу РВВ (у метрах; з двома цифрами після коми)'),
  754 + 'cross_angle' => $this->decimal()->comment('Кут перетину (в градусах; з двома цифрами після коми)'),
  755 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  756 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  757 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  758 + 'material_id' => $this->integer()->comment('Матеріал споруди (згідно з [4])'),
  759 + 'capacity' => $this->decimal()->comment('Об\'єм споруди (у кубічних метрах; з двома цифрами після коми)'),
  760 + 'communication_type_id' => $this->integer()->comment('Тип комунікації, яка перепускається спорудою (згідно з [4])'),
  761 + 'drainage_type_id' => $this->integer()->comment('Тип водовідведення (згідно з [4])'),
  762 + 'drainage_length' => $this->decimal()->comment('Загальна довжина водовідвідних елементів (у метрах; з двома цифрами після коми)'),
  763 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  764 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  765 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  766 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  767 + 'project_organization' => $this->text()->comment('Проектна організація'),
  768 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  769 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  770 + 'drainage_pipe_card_id' => $this->integer()->comment('Картка водовідвідної труби (окрема облікова картка; табл. 5.39)'),
  771 + 'drainage_card_id' => $this->integer()->comment('Картка дренажної системи (окрема облікова картка; табл. 5.52)'),
  772 + 'technical_doc_id' => $this->integer()->comment('Технічна документація (окрема облікова картка; табл. 5.23)'),
  773 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  774 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  775 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  776 + 'sel_protection_outline_coords' => $this->string()->comment('Координати контуру споруди (геодані)'),
  777 + ]);
  778 + $this->addCommentOnTable('sel_protection_card', 'Дані про селезахисну споруду');
  779 +
  780 + // Table 5.38
  781 + $this->createTable('drainage_pipe', [
  782 + 'drainage_pipe_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  783 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  784 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  785 + 'position' => $this->string()->comment('Положення предмета захисту (псевдогеодані)'),
  786 + 'obstacle_type_id' => $this->integer()->comment('Вид перешкоди (згідно з [4])'),
  787 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  788 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  789 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  790 + 'culvert_elements_entrance_count' => $this->integer()->comment('Кількість ВПЕ на вході'),
  791 + 'culvert_elements_exit_count' => $this->integer()->comment('Кількість ВПЕ на виході'),
  792 + 'header_entrance_count' => $this->integer()->comment('Кількість оголовків на вході'),
  793 + 'header_exit_count' => $this->integer()->comment('Кількість оголовків на виході'),
  794 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  795 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  796 + 'drainage_pipe_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.39)'),
  797 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  798 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  799 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  800 + ]);
  801 + $this->addCommentOnTable('drainage_pipe', 'Облікова відомість труб водопропускних');
  802 +
  803 + // Table 5.39
  804 + $this->createTable('drainage_pipe_card', [
  805 + 'drainage_pipe_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  806 + 'position' => $this->string()->comment('Положення споруди (псевдогеодані)'),
  807 + 'year_build' => $this->text()->comment('Рік побудови'),
  808 + 'year_reconstruction' => $this->text()->comment('Рік реконструкції'),
  809 + 'obstacle_type_id' => $this->integer()->comment('Вид перешкоди (згідно з [4])'),
  810 + 'flow_km_direction' => $this->integer()->comment('Напрямок течії по ходу кілометражу (згідно з [4])'),
  811 + 'communication_type_id' => $this->integer()->comment('Тип комунікації, яка перепускається спорудою (згідно з [4])'),
  812 + 'road_surface_up_height' => $this->decimal()->comment('Висота земляного полотна над трубою (у метрах; з двома цифрами після коми)'),
  813 + 'culvert_elements_entrance_count' => $this->integer()->comment('Кількість ВПЕ на вході'),
  814 + 'culvert_elements_exit_count' => $this->integer()->comment('Кількість ВПЕ на виході'),
  815 + 'header_entrance_count' => $this->integer()->comment('Кількість оголовків на вході'),
  816 + 'header_exit_count' => $this->integer()->comment('Кількість оголовків на виході'),
  817 + 'culvert_elements_area' => $this->decimal()->comment('Сумарна площа всіх ВПЕ (у квадратних метрах; з двома цифрами після коми)'),
  818 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  819 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  820 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  821 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  822 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  823 + 'project_organization' => $this->text()->comment('Проектна організація'),
  824 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  825 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  826 + 'culvert_element_card_id' => $this->integer()->comment('Картка ВПЕ (окрема облікова картка; табл. 5.40)'),
  827 + 'header_card_id' => $this->integer()->comment('Картка оголовка (окрема облікова картка; табл. 5.41)'),
  828 + 'technical_doc_id' => $this->integer()->comment('Технічна документація (окрема облікова картка; табл. 5.23)'),
  829 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  830 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  831 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  832 + 'culvert_elements_one_coords' => $this->string()->comment('Координати вісі ВПЕ No 1 (геодані)'),
  833 + 'culvert_elements_two_coords' => $this->string()->comment('Координати вісі ВПЕ No 2 (геодані)'),
  834 + 'culvert_elements_three_coords' => $this->string()->comment('Координати вісі ВПЕ No 3 (геодані)'),
  835 + 'culvert_elements_four_coords' => $this->string()->comment('Координати вісі ВПЕ No 4 (геодані)'),
  836 + 'culvert_elements_five_coords' => $this->string()->comment('Координати вісі ВПЕ No 5 (геодані)'),
  837 + ]);
  838 + $this->addCommentOnTable('drainage_pipe_card', 'Дані про трубу водопропускну');
  839 +
  840 + // Table 5.40
  841 + $this->createTable('culvert_element_card', [
  842 + 'culvert_element_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  843 + 'culvert_element_number' => $this->integer()->comment('Номер ВПЕ'),
  844 + 'section_long_scheme' => $this->text()->comment('Поздовжня схема перерізів'),
  845 + 'section_type_id' => $this->integer()->comment('Тип перерізу (згідно з [4])'),
  846 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  847 + 'height' => $this->decimal()->comment('Висота отвору (у метрах; з двома цифрами після коми)'),
  848 + 'width' => $this->decimal()->comment('Ширина отвору (у метрах; з двома цифрами після коми)'),
  849 + 'culvert_element_work_id' => $this->integer()->comment('Характер роботи ВПЕ (згідно з [4])'),
  850 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  851 + 'fortified_additional_bottom' => $this->integer()->comment('Додаткове укріплення дна (згідно з [4])'),
  852 + 'capacity' => $this->decimal()->comment('Об\'єм тіла ВПЕ (у кубічних метрах; з двома цифрами після коми)'),
  853 + 'foundation_thick' => $this->decimal()->comment('Товщина фундаменту (у метрах; з двома цифрами після коми)'),
  854 + 'foundation_material_id' => $this->integer()->comment('Матеріал фундаменту (згідно з [4])'),
  855 + 'basement_material_id' => $this->integer()->comment('Матеріал основи (згідно з [4])'),
  856 + 'foundation_basement_capacity' => $this->decimal()->comment('Загальний об\'єм фундаменту та основи (у кубічних метрах; з двома цифрами після коми)'),
  857 + 'waterproof_type_id' => $this->integer()->comment('Тип гідроізоляції (згідно з [4])'),
  858 + ]);
  859 + $this->addCommentOnTable('culvert_element_card', 'Дані про ВПЕ');
  860 +
  861 + // Table 5.41
  862 + $this->createTable('header_card', [
  863 + 'header_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  864 + 'purpose' => $this->text()->comment('Призначення оголовка'),
  865 + 'culvert_elements_junction_numbers' => $this->text()->comment('Номери ВПЕ, поєднаних оголовком'),
  866 + 'header_type_id' => $this->integer()->comment('Тип оголовка (згідно з [4])'),
  867 + 'header_first_type_material_id' => $this->integer()->comment('Матеріал портальної стінки порталу 1-го типу (згідно з [4])'),
  868 + 'header_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  869 + 'header_second_type_material_id' => $this->integer()->comment('Матеріал портальної стінки порталу 2-го типу (згідно з [4])'),
  870 + 'header_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  871 + 'wing_material_id' => $this->integer()->comment('Матеріал відкрилків (згідно з [4])'),
  872 + 'wing_capacity' => $this->integer()->comment('Об\'єм тіла відкрилків (у кубічних метрах; з двома цифрами після коми)'),
  873 + 'foundation_thick' => $this->decimal()->comment('Товщина фундаменту (у метрах; з двома цифрами після коми)'),
  874 + 'foundation_material_id' => $this->integer()->comment('Матеріал фундаменту (згідно з [4])'),
  875 + 'basement_type_id' => $this->integer()->comment('Тип основи (згідно з [4])'),
  876 + 'foundation_basement_capacity' => $this->decimal()->comment('Загальний об\'єм фундаменту та основи (у кубічних метрах; з двома цифрами після коми)'),
  877 + 'fortified_channel_material_id' => $this->integer()->comment('Матеріал укріплення русла (згідно з [4])'),
  878 + 'regulatory_type_id' => $this->integer()->comment('Тип регуляційних елементів (згідно з [4])'),
  879 + 'fortified_mound_header_material_id' => $this->integer()->comment('Матеріал укріплення насипу біля оголовка (згідно з [4])'),
  880 + ]);
  881 + $this->addCommentOnTable('header_card', 'Дані про оголовок');
  882 +
  883 + // Table 5.42
  884 + $this->createTable('bus_station', [
  885 + 'bus_station_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  886 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  887 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  888 + 'position' => $this->string()->comment('Положення споруди (псевдогеодані)'),
  889 + 'pavilion_availability' => $this->integer()->comment('Наявність автопавільйона (згідно з [4])'),
  890 + 'pocket_availability' => $this->integer()->comment('Наявність заїзної кишені (згідно з [4])'),
  891 + 'landing_surface_availability' => $this->integer()->comment('Наявність посадкового майданчика з удосконаленим покриттям (згідно з [4])'),
  892 + 'toilet_availability' => $this->integer()->comment('Наявність туалета (згідно з [4])'),
  893 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  894 + 'bus_station_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.43)'),
  895 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  896 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  897 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  898 + ]);
  899 + $this->addCommentOnTable('bus_station', 'Облікова відомість автобусних зупинок та автопавільйонів');
  900 +
  901 + // Table 5.43
  902 + $this->createTable('bus_station_card', [
  903 + 'bus_station_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  904 + 'position' => $this->string()->comment('Положення споруди (псевдогеодані)'),
  905 + 'location' => $this->text()->comment('Розташування'),
  906 + 'name' => $this->text()->comment('Власна назва'),
  907 + 'year_build' => $this->text()->comment('Рік побудови'),
  908 + 'year_reconstruction' => $this->text()->comment('Рік реконструкції'),
  909 + 'pavilion_availability' => $this->integer()->comment('Наявність автопавільйона (згідно з [4])'),
  910 + 'pocket_availability' => $this->integer()->comment('Наявність заїзної кишені (згідно з [4])'),
  911 + 'landing_surface_availability' => $this->integer()->comment('Наявність посадкового майданчика з удосконаленим покриттям (згідно з [4])'),
  912 + 'landing_surface_material_id' => $this->integer()->comment('Покриття посадочного майданчика (згідно з [4])'),
  913 + 'toilet_availability' => $this->integer()->comment('Наявність туалета (згідно з [4])'),
  914 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  915 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  916 + 'project_organization' => $this->text()->comment('Проектна організація'),
  917 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  918 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  919 + 'pavilion_card_id' => $this->integer()->comment('Автопавільйон (згідно з [4])'),
  920 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  921 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  922 + 'construction_center_coords' => $this->string()->comment('Координати центру споруди (геодані)'),
  923 + ]);
  924 + $this->addCommentOnTable('bus_station_card', 'Дані про автобусну зупинку');
  925 +
  926 + // Table 5.44
  927 + $this->createTable('pavilion_card', [
  928 + 'pavilion_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  929 + 'roof_first_type_material_id' => $this->integer()->comment('Матеріал даху 1-го типу (згідно з [4])'),
  930 + 'roof_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  931 + 'roof_second_type_material_id' => $this->integer()->comment('Матеріал даху 2-го типу (згідно з [4])'),
  932 + 'roof_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  933 + 'wall_first_type_material_id' => $this->integer()->comment('Матеріал стін 1-го типу (згідно з [4])'),
  934 + 'wall_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  935 + 'wall_second_type_material_id' => $this->integer()->comment('Матеріал стін 2-го типу (згідно з [4])'),
  936 + 'wall_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  937 + 'year_build' => $this->text()->comment('Рік побудови'),
  938 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  939 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  940 + 'pavilion_outline_coords' => $this->string()->comment('Координати контуру павільйону (геодані)'),
  941 + ]);
  942 + $this->addCommentOnTable('pavilion_card', 'Дані про автопавільйон');
  943 +
  944 + // Table 5.45
  945 + $this->createTable('retaining_wall', [
  946 + 'retaining_wall_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  947 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  948 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  949 + 'position' => $this->string()->comment('Положення середини споруди (псевдогеодані)'),
  950 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  951 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  952 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  953 + 'location' => $this->text()->comment('Розташування'),
  954 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  955 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  956 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  957 + 'retaining_wall_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.46)'),
  958 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  959 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  960 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  961 + ]);
  962 + $this->addCommentOnTable('retaining_wall', 'Облікова відомість підпірних стінок');
  963 +
  964 + // Table 5.46
  965 + $this->createTable('retaining_wall_card', [
  966 + 'retaining_wall_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  967 + 'begin' => $this->string()->comment('Положення початку споруди (псевдогеодані)'),
  968 + 'end' => $this->string()->comment('Положення кінця споруди (псевдогеодані)'),
  969 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  970 + 'location' => $this->text()->comment('Розташування'),
  971 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  972 + 'purpose' => $this->integer()->comment('Призначення споруди (згідно з [4])'),
  973 + 'year_build' => $this->text()->comment('Рік побудови'),
  974 + 'year_reconstruction' => $this->text()->comment('Рік реконструкції'),
  975 + 'material_id' => $this->integer()->comment('Матеріал споруди (згідно з [4])'),
  976 + 'drainage_wall_availability' => $this->integer()->comment('Наявність застінного дренажу (згідно з [4])'),
  977 + 'material_capacity' => $this->decimal()->comment('Об\'єм матеріалів в споруді (у кубічних метрах; з двома цифрами після коми)'),
  978 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  979 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  980 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  981 + 'project_organization' => $this->text()->comment('Проектна організація'),
  982 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  983 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  984 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  985 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  986 + 'construction_coords' => $this->string()->comment('Координати вісі споруди (геодані)'),
  987 + ]);
  988 + $this->addCommentOnTable('retaining_wall_card', 'Дані про підпірну стінку');
  989 +
  990 + // Table 5.47
  991 + $this->createTable('stabilisation_field', [
  992 + 'stabilisation_field_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  993 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  994 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  995 + 'purpose' => $this->text()->comment('Призначення споруди'),
  996 + 'area' => $this->decimal()->comment('Площа (у квадратних метрах; з двома цифрами після коми)'),
  997 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  998 + 'stabilisation_field_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.48)'),
  999 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1000 + 'monitor_result' => $this->text()->comment('Результати моніторингу'),
  1001 + 'date_monitor' => $this->integer()->comment('Дата моніторингу (згідно з [4])'),
  1002 + ]);
  1003 + $this->addCommentOnTable('stabilisation_field', 'Облікова відомість стабілізаційних полів');
  1004 +
  1005 + // Table 5.48
  1006 + $this->createTable('stabilisation_field_card', [
  1007 + 'stabilisation_field_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1008 + 'area' => $this->decimal()->comment('Площа споруди (у квадратних метрах; з двома цифрами після коми)'),
  1009 + 'pile_type_id' => $this->integer()->comment('Тип паль (згідно з [4])'),
  1010 + 'pile_cut' => $this->decimal()->comment('Переріз паль (у метрах; з двома цифрами після коми)'),
  1011 + 'pile_length' => $this->decimal()->comment('Довжина паль (у метрах; з двома цифрами після коми)'),
  1012 + 'pile_count' => $this->integer()->comment('Кількість паль'),
  1013 + 'year_build' => $this->text()->comment('Рік побудови'),
  1014 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1015 + 'monitor_result' => $this->text()->comment('Результати моніторингу'),
  1016 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1017 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1018 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1019 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1020 + 'construction_outline_coords' => $this->string()->comment('Координати контуру споруди (геодані)'),
  1021 + ]);
  1022 + $this->addCommentOnTable('stabilisation_field_card', 'Дані про стабілізаційне поле');
  1023 +
  1024 + // Table 5.49
  1025 + $this->createTable('tray', [
  1026 + 'tray_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1027 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1028 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1029 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1030 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1031 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  1032 + 'location' => $this->text()->comment('Розташування'),
  1033 + 'purpose' => $this->integer()->comment('Призначення (згідно з [4])'),
  1034 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  1035 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1036 + 'tray_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.50)'),
  1037 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1038 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1039 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1040 + ]);
  1041 + $this->addCommentOnTable('tray', 'Облікова відомість лотків');
  1042 +
  1043 + // Table 5.50
  1044 + $this->createTable('tray_card', [
  1045 + 'tray_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1046 + 'begin' => $this->string()->comment('Положення початку споруди (псевдогеодані)'),
  1047 + 'end' => $this->string()->comment('Положення кінця споруди (псевдогеодані)'),
  1048 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  1049 + 'location' => $this->text()->comment('Розташування'),
  1050 + 'purpose' => $this->text()->comment('Призначення'),
  1051 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  1052 + 'body_material_id' => $this->integer()->comment('Матеріал тіла споруди (згідно з [4])'),
  1053 + 'body_material_capacity' => $this->decimal()->comment('Об\'єм матеріалів тіла споруди (у кубічних метрах; з двома цифрами після коми)'),
  1054 + 'basement_material_id' => $this->integer()->comment('Матеріал основи споруди (згідно з [4])'),
  1055 + 'basement_material_capacity' => $this->decimal()->comment('Об\'єм матеріалів основи споруди (у кубічних метрах; з двома цифрами після коми)'),
  1056 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1057 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1058 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1059 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1060 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1061 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1062 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  1063 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  1064 + 'construction_coords' => $this->string()->comment('Координати вісі споруди (геодані)'),
  1065 + ]);
  1066 + $this->addCommentOnTable('tray_card', 'Дані про лоток, перепад, швидкотік');
  1067 +
  1068 + // Table 5.51
  1069 + $this->createTable('drainage', [
  1070 + 'drainage_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1071 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1072 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1073 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1074 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1075 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  1076 + 'location' => $this->text()->comment('Розташування'),
  1077 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  1078 + 'drainage_construction_type_id' => $this->integer()->comment('Тип конструкції дренажу (згідно з [4])'),
  1079 + 'drainage_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.52)'),
  1080 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1081 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1082 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1083 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1084 + ]);
  1085 + $this->addCommentOnTable('drainage', 'Облікова відомість дренажних споруд');
  1086 +
  1087 + // Table 5.52
  1088 + $this->createTable('drainage_card', [
  1089 + 'drainage_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1090 + 'begin' => $this->string()->comment('Положення початку споруди (псевдогеодані)'),
  1091 + 'end' => $this->string()->comment('Положення кінця споруди (псевдогеодані)'),
  1092 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  1093 + 'location' => $this->text()->comment('Розташування'),
  1094 + 'purpose' => $this->text()->comment('Призначення'),
  1095 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  1096 + 'drainage_construction_type_id' => $this->integer()->comment('Тип конструкції дренажу (згідно з [4])'),
  1097 + 'manhole_count' => $this->integer()->comment('Кількість оглядових колодязів'),
  1098 + 'manhole_first_type_material_id' => $this->integer()->comment('Матеріал оглядових колодязів 1-го типу (згідно з [4])'),
  1099 + 'manhole_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів оглядових колодязів 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1100 + 'manhole_second_type_material_id' => $this->integer()->comment('Матеріал оглядових колодязів 2-го типу (згідно з [4])'),
  1101 + 'manhole_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів оглядових колодязів 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1102 + 'drainage_pipe_first_type_material_id' => $this->integer()->comment('Матеріал дренажних труб 1-го типу (згідно з [4])'),
  1103 + 'drainage_pipe_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів дренажних труб 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1104 + 'drainage_pipe_second_type_material_id' => $this->integer()->comment('Матеріал дренажних труб 2-го типу (згідно з [4])'),
  1105 + 'drainage_pipe_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів дренажних труб 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1106 + 'drainage_pipe_third_type_material_id' => $this->integer()->comment('Матеріал дренажних труб 3-го типу (згідно з [4])'),
  1107 + 'drainage_pipe_third_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів дренажних труб 3-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1108 + 'drainage_pipe_fourth_type_material_id' => $this->integer()->comment('Матеріал дренажних труб 4-го типу (згідно з [4])'),
  1109 + 'drainage_pipe_fourth_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів дренажних труб 4-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1110 + 'exhaust_construction_first_type_material_id' => $this->integer()->comment('Матеріал випускної споруди 1-го типу (згідно з [4])'),
  1111 + 'exhaust_construction_first_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів випускної споруди 1-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1112 + 'exhaust_construction_second_type_material_id' => $this->integer()->comment('Матеріал випускної споруди 2-го типу (згідно з [4])'),
  1113 + 'exhaust_construction_second_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів випускної споруди 2-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1114 + 'exhaust_construction_third_type_material_id' => $this->integer()->comment('Матеріал випускної споруди 3-го типу (згідно з [4])'),
  1115 + 'exhaust_construction_third_type_capacity' => $this->decimal()->comment('Об\'єм матеріалів випускної споруди 3-го типу (у кубічних метрах; з двома цифрами після коми)'),
  1116 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1117 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1118 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1119 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1120 + 'draft' => $this->string()->comment('Креслення (pdf [3])'),
  1121 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  1122 + 'construction_up_coords' => $this->string()->comment('Координати вісі споруди по верху (геодані)'),
  1123 + 'construction_down_coords' => $this->string()->comment('Координати вісі споруди по низу (геодані)'),
  1124 + ]);
  1125 + $this->addCommentOnTable('drainage_card', 'Дані про дренажну споруду');
  1126 +
  1127 + // Table 5.53
  1128 + $this->createTable('site', [
  1129 + 'site_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1130 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1131 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1132 + 'position' => $this->string()->comment('Положення середини споруди (псевдогеодані)'),
  1133 + 'location' => $this->text()->comment('Розташування'),
  1134 + 'purpose' => $this->text()->comment('Призначення майданчика'),
  1135 + 'surface_type_id' => $this->integer()->comment('Тип покриття (згідно з [4])'),
  1136 + 'area' => $this->decimal()->comment('Площа покриття стоянки (у квадратних метрах; з двома цифрами після коми)'),
  1137 + 'site_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.54)'),
  1138 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1139 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1140 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1141 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1142 + ]);
  1143 + $this->addCommentOnTable('site', 'Облікова відомість майданчиків');
  1144 +
  1145 + // Table 5.54
  1146 + $this->createTable('site_card', [
  1147 + 'site_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1148 + 'location' => $this->text()->comment('Розташування'),
  1149 + 'purpose' => $this->text()->comment('Призначення майданчика'),
  1150 + 'surface_type_id' => $this->integer()->comment('Тип покриття (згідно з [4])'),
  1151 + 'area' => $this->decimal()->comment('Площа покриття (у квадратних метрах; з двома цифрами після коми)'),
  1152 + 'improvement_card_id' => $this->integer()->comment('Елементи благоустрою (окрема облікова картка; табл. 5.55)'),
  1153 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1154 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1155 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1156 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1157 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1158 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1159 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  1160 + 'construction_outline_coords' => $this->string()->comment('Координати контуру споруди (геодані)'),
  1161 + 'construction_center_coords' => $this->string()->comment('Координати вісі споруди по верху (геодані)'),
  1162 + ]);
  1163 + $this->addCommentOnTable('site_card', 'Дані про майданчик');
  1164 +
  1165 + // Table 5.55
  1166 + $this->createTable('improvement_card', [
  1167 + 'improvement_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1168 + 'improvement_miss' => $this->integer()->comment('Благоустрій відсутній (згідно з [4])'),
  1169 + 'water_drink' => $this->integer()->comment('Вода питна (згідно з [4])'),
  1170 + 'water_technical' => $this->integer()->comment('Вода технічна (згідно з [4])'),
  1171 + 'trestle' => $this->integer()->comment('Естакада (згідно з [4])'),
  1172 + 'terminal_informational' => $this->integer()->comment('Інформаційний термінал (згідно з [4])'),
  1173 + 'architecture_form_small' => $this->integer()->comment('Малі архітектурні форми (згідно з [4])'),
  1174 + 'light' => $this->integer()->comment('Освітлення (згідно з [4])'),
  1175 + 'security' => $this->integer()->comment('Охорона (згідно з [4])'),
  1176 + ]);
  1177 + $this->addCommentOnTable('improvement_card', 'Дані про елемент благоустрою');
  1178 +
  1179 + // Table 5.56
  1180 + $this->createTable('sidewalk', [
  1181 + 'sidewalk_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1182 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1183 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1184 + 'settlement_name' => $this->text()->comment('Назва населеного пункту'),
  1185 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1186 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1187 + 'location' => $this->text()->comment('Розташування'),
  1188 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  1189 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  1190 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  1191 + 'surface_type_id' => $this->integer()->comment('Тип покриття (згідно з [4])'),
  1192 + 'area' => $this->decimal()->comment('Площа покриття (у квадратних метрах; з двома цифрами після коми)'),
  1193 + 'sidewalk_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.57)'),
  1194 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1195 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1196 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1197 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1198 + ]);
  1199 + $this->addCommentOnTable('sidewalk', 'Облікова відомість тротуарів та велодоріжок');
  1200 +
  1201 + // Table 5.57
  1202 + $this->createTable('sidewalk_card', [
  1203 + 'sidewalk_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1204 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1205 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1206 + 'location' => $this->text()->comment('Розташування'),
  1207 + 'length' => $this->decimal()->comment('Довжина споруди (у метрах; з двома цифрами після коми)'),
  1208 + 'width' => $this->decimal()->comment('Ширина споруди (у метрах; з двома цифрами після коми)'),
  1209 + 'constrution_type_id' => $this->integer()->comment('Тип споруди (згідно з [4])'),
  1210 + 'road_surface_id' => $this->integer()->comment('Дорожній одяг (окрема облікова картка; табл. 5.9)'),
  1211 + 'area' => $this->decimal()->comment('Площа покриття (у квадратних метрах; з двома цифрами після коми)'),
  1212 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1213 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1214 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1215 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1216 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1217 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1218 + 'construction_outline_coords' => $this->string()->comment('Координати контуру споруди (геодані)'),
  1219 + ]);
  1220 + $this->addCommentOnTable('sidewalk_card', 'Дані про тротуар, велодоріжку');
  1221 +
  1222 + // Table 5.58
  1223 + $this->createTable('fence', [
  1224 + 'fence_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1225 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1226 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1227 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1228 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1229 + 'location' => $this->text()->comment('Розташування'),
  1230 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1231 + 'fence_type_id' => $this->integer()->comment('Тип огородження (згідно з [4])'),
  1232 + 'fence_construction_type_id' => $this->integer()->comment('Тип конструкції огородження (згідно з [4])'),
  1233 + 'fence_construction_id' => $this->integer()->comment('Конструкція огородження (згідно з [4])'),
  1234 + 'material_id' => $this->integer()->comment('Матеріал огородження (згідно з [4])'),
  1235 + 'stud_material_id' => $this->integer()->comment('Матеріал стояків (згідно з [4])'),
  1236 + 'fence_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.59)'),
  1237 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1238 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1239 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1240 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1241 + ]);
  1242 + $this->addCommentOnTable('fence', 'Облікова відомість огороджень');
  1243 +
  1244 + // Table 5.59
  1245 + $this->createTable('fence_card', [
  1246 + 'fence_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1247 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1248 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1249 + 'location' => $this->text()->comment('Розташування'),
  1250 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1251 + 'fence_type_id' => $this->integer()->comment('Тип огородження (згідно з ДСТУ 2735)'),
  1252 + 'fence_construction_id' => $this->integer()->comment('Конструкція огородження (згідно з [4])'),
  1253 + 'material_id' => $this->integer()->comment('Матеріал елементів огородження (згідно з [4])'),
  1254 + 'stud_material_id' => $this->integer()->comment('Матеріал стояків (згідно з [4])'),
  1255 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1256 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1257 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1258 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1259 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1260 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1261 + 'construction_coords' => $this->string()->comment('Координати вісі споруди (геодані)'),
  1262 + ]);
  1263 + $this->addCommentOnTable('fence_card', 'Дані про окрему ділянку огородження');
  1264 +
  1265 + // Table 5.60
  1266 + $this->createTable('direct_device', [
  1267 + 'direct_device_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1268 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1269 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1270 + 'begin' => $this->string()->comment('Початок сукупності пристроїв (псевдогеодані)'),
  1271 + 'end' => $this->string()->comment('Кінець сукупності пристроїв (псевдогеодані)'),
  1272 + 'location' => $this->text()->comment('Розташування'),
  1273 + 'direct_device_type_id' => $this->integer()->comment('Тип напрямного пристрою (згідно з [4])'),
  1274 + 'device_count' => $this->integer()->comment('Кількість елементів в групі'),
  1275 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1276 + 'direct_device_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.61)'),
  1277 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1278 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1279 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1280 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1281 + ]);
  1282 + $this->addCommentOnTable('direct_device', 'Облікова відомість напрямних пристроїв');
  1283 +
  1284 + // Table 5.61
  1285 + $this->createTable('direct_device_card', [
  1286 + 'direct_device_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1287 + 'begin' => $this->string()->comment('Початок сукупності пристроїв (псевдогеодані)'),
  1288 + 'end' => $this->string()->comment('Кінець сукупності пристроїв (псевдогеодані)'),
  1289 + 'location' => $this->text()->comment('Розташування'),
  1290 + 'direct_device_type_id' => $this->integer()->comment('Тип напрямного пристрою (згідно з [4])'),
  1291 + 'device_count' => $this->integer()->comment('Кількість елементів в групі'),
  1292 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1293 + 'reflective_element_availability' => $this->integer()->comment('Наявність світлоповертаючих елементів (згідно з [4])'),
  1294 + 'artificial_light_availability' => $this->integer()->comment('Наявність штучної підствітки (згідно з [4])'),
  1295 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1296 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1297 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1298 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1299 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1300 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1301 + 'construction_coords' => $this->string()->comment('Координати елементів сукупності (геодані)'),
  1302 + ]);
  1303 + $this->addCommentOnTable('direct_device_card', 'Дані про напрямний пристрій або їх сукупність');
  1304 +
  1305 + // Table 5.62
  1306 + $this->createTable('noise_dazzle_protection', [
  1307 + 'noise_dazzle_protection_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1308 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1309 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1310 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1311 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1312 + 'location' => $this->text()->comment('Розташування'),
  1313 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1314 + 'purpose' => $this->text()->comment('Призначення'),
  1315 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1316 + 'noise_dazzle_protection_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.63 - 5.64)'),
  1317 + 'state' => $this->integer()->comment('Стан споруди (згідно з [4])'),
  1318 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1319 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1320 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1321 + ]);
  1322 + $this->addCommentOnTable('noise_dazzle_protection', 'Облікова шумозахисних та протизасліплювальних споруд');
  1323 +
  1324 + // Table 5.63
  1325 + $this->createTable('dazzle_protection_card', [
  1326 + 'dazzle_protection_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1327 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1328 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1329 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1330 + 'location' => $this->text()->comment('Розташування'),
  1331 + 'purpose' => $this->text()->comment('Призначення споруди'),
  1332 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1333 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  1334 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1335 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1336 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1337 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1338 + 'construction_coords' => $this->string()->comment('Координати вісі споруди (геодані)'),
  1339 + ]);
  1340 + $this->addCommentOnTable('dazzle_protection_card', 'Дані про протизасліплювальну споруду');
  1341 +
  1342 + // Table 5.64
  1343 + $this->createTable('noise_protection_card', [
  1344 + 'noise_protection_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1345 + 'begin' => $this->string()->comment('Початок споруди (псевдогеодані)'),
  1346 + 'end' => $this->string()->comment('Кінець споруди (псевдогеодані)'),
  1347 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1348 + 'location' => $this->text()->comment('Розташування'),
  1349 + 'purpose' => $this->text()->comment('Призначення споруди'),
  1350 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1351 + 'height' => $this->decimal()->comment('Висота споруди (у метрах; з двома цифрами після коми)'),
  1352 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1353 + 'break_counter_screen_availability' => $this->integer()->comment('Наявність розривів та контр-екранів (згідно з [4])'),
  1354 + 'drainage_availability' => $this->integer()->comment('Наявність водовідведення (згідно з [4])'),
  1355 + 'vibration_absorbing_availability' => $this->integer()->comment('Наявність пружних вібропоглинаючих прокладок між секціями (згідно з [4])'),
  1356 + 'sound_reflect_cassette_material_id' => $this->integer()->comment('Матеріал звуковідбивних касет (згідно з [4])'),
  1357 + 'sound_absorbing_cassette_material_id' => $this->integer()->comment('Матеріал звукопоглинальних касет (згідно з [4])'),
  1358 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1359 + 'acoustic_project_effectivity' => $this->text()->comment('Проектна акустична ефективність'),
  1360 + 'acoustic_effectivity_indicator' => $this->text()->comment('Показник акустичної ефективності споруди'),
  1361 + 'exploitation_instruction_availability' => $this->integer()->comment('Наявніть інструкції з експлуатації (згідно з [4])'),
  1362 + 'project_doc_location' => $this->text()->comment('Місце зберігання проектної документації'),
  1363 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1364 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1365 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1366 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1367 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  1368 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  1369 + 'act_work_performed' => $this->text()->comment('Акт виконаних робіт (pdf [3])'),
  1370 + 'repair_certificate' => $this->string()->comment('Довідка про виконання ремонтних робіт (pdf [3])'),
  1371 + 'construction_coords' => $this->string()->comment('Координати вісі споруди (геодані)'),
  1372 + ]);
  1373 + $this->addCommentOnTable('noise_protection_card', 'Дані про шумозахисну споруду');
  1374 +
  1375 + // Table 5.65
  1376 + $this->createTable('road_sign', [
  1377 + 'road_sign_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1378 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1379 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1380 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  1381 + 'size_typical' => $this->integer()->comment('Типорозмір (згідно з 3.17 ДСТУ 4100)'),
  1382 + 'number' => $this->integer()->comment('Типорозмір (згідно з 3.2 ДСТУ 4100)'),
  1383 + 'text' => $this->text()->comment('Текст'),
  1384 + 'location' => $this->text()->comment('Розташування'),
  1385 + 'purpose_direction' => $this->text()->comment('Призначення для напрямку руху'),
  1386 + 'fasten_type_id' => $this->integer()->comment('Тип кріплення знаку (згідно з [4])'),
  1387 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1388 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1389 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1390 + 'defects' => $this->text()->comment('Дефекти'),
  1391 + 'road_sign_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.66)'),
  1392 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1393 + ]);
  1394 + $this->addCommentOnTable('road_sign', 'Облікова відомість знаків дорожніх');
  1395 +
  1396 + // Table 5.66
  1397 + $this->createTable('road_sign_card', [
  1398 + 'road_sign_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1399 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  1400 + 'size_typical' => $this->integer()->comment('Типорозмір (згідно з 3.17 ДСТУ 4100)'),
  1401 + 'number' => $this->integer()->comment('Типорозмір (згідно з 3.2 ДСТУ 4100)'),
  1402 + 'text' => $this->text()->comment('Текст'),
  1403 + 'location' => $this->text()->comment('Розташування'),
  1404 + 'purpose_direction' => $this->text()->comment('Призначення для напрямку руху'),
  1405 + 'fasten_type_id' => $this->integer()->comment('Тип кріплення знаку (згідно з [4])'),
  1406 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1407 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1408 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1409 + 'defects' => $this->text()->comment('Дефекти'),
  1410 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1411 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1412 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1413 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1414 + ]);
  1415 + $this->addCommentOnTable('road_sign_card', 'Дані про знак дорожній');
  1416 +
  1417 + // Table 5.67
  1418 + $this->createTable('road_mark', [
  1419 + 'road_mark_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1420 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1421 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1422 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1423 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1424 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1425 + 'area' => $this->decimal()->comment('Площа покриття (у квадратних метрах; з двома цифрами після коми)'),
  1426 + 'group' => $this->integer()->comment('Група розмітки (згідно з 4.1 ДСТУ 2587)'),
  1427 + 'number' => $this->integer()->comment('Номер розмітки (згідно з 4.1 ДСТУ 2587)'),
  1428 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1429 + 'reflective_element_availability' => $this->integer()->comment('Наявність світлоповертальних елементів (згідно з [4])'),
  1430 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1431 + 'balance_cost' => $this->decimal()->comment('Балансова вартість споруди (у тисячах гривень; з двома цифрами після коми)'),
  1432 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1433 + 'defects' => $this->integer()->comment('Дефекти (згідно з [4])'),
  1434 + 'road_mark_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.68)'),
  1435 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1436 + ]);
  1437 + $this->addCommentOnTable('road_mark', 'Облікова відомість розміток дорожніх');
  1438 +
  1439 + // Table 5.68
  1440 + $this->createTable('road_mark_card', [
  1441 + 'road_mark_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1442 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1443 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1444 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1445 + 'area' => $this->decimal()->comment('Площа (у квадратних метрах; з двома цифрами після коми)'),
  1446 + 'group' => $this->integer()->comment('Група розмітки (згідно з 4.1 ДСТУ 2587)'),
  1447 + 'number' => $this->integer()->comment('Номер розмітки (згідно з 4.1 ДСТУ 2587)'),
  1448 + 'material_id' => $this->integer()->comment('Матеріал (згідно з [4])'),
  1449 + 'reflective_element_availability' => $this->integer()->comment('Наявність світлоповертальних елементів (згідно з [4])'),
  1450 + 'defects' => $this->integer()->comment('Дефекти (згідно з [4])'),
  1451 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1452 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1453 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1454 + ]);
  1455 + $this->addCommentOnTable('road_mark_card', 'Дані про розмітку дорожню');
  1456 +
  1457 + // Table 5.69
  1458 + $this->createTable('planting', [
  1459 + 'planting_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1460 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1461 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1462 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1463 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1464 + 'location' => $this->text()->comment('Розташування'),
  1465 + 'purpose' => $this->text()->comment('Призначення'),
  1466 + 'tree_lane_count' => $this->integer()->comment('Кількість рядів дерев'),
  1467 + 'lane_width_average' => $this->decimal()->comment('Середня ширина смуги (у метрах; з двома цифрами після коми)'),
  1468 + 'area' => $this->decimal()->comment('Площа (у квадратних метрах; з двома цифрами після коми)'),
  1469 + 'year_build' => $this->text()->comment('Рік висадження'),
  1470 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1471 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  1472 + 'defects' => $this->text()->comment('Дефекти'),
  1473 + 'planting_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.70)'),
  1474 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1475 + ]);
  1476 + $this->addCommentOnTable('planting', 'Облікова відомість штучних насаджень');
  1477 +
  1478 + // Table 5.70
  1479 + $this->createTable('planting_card', [
  1480 + 'planting_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1481 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1482 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1483 + 'location' => $this->text()->comment('Розташування'),
  1484 + 'purpose' => $this->text()->comment('Призначення'),
  1485 + 'road_distance' => $this->decimal()->comment('Відстань від крайки проїзної частини дороги до найближчого краю стовбура дерева першого ряду насаджень (у метрах; з двома цифрами після коми)'),
  1486 + 'tree_assortment' => $this->text()->comment('Асортимент порід дерев і кущів'),
  1487 + 'tree_row_count' => $this->integer()->comment('Кількість рядів дерев'),
  1488 + 'lane_width_average' => $this->decimal()->comment('Середня ширина смуги озеленення (у метрах; з двома цифрами після коми)'),
  1489 + 'tree_top_height' => $this->decimal()->comment('Найвища висота дерева (у метрах; з двома цифрами після коми)'),
  1490 + 'tree_crown_width' => $this->decimal()->comment('Ширина крони дерева (у метрах; з двома цифрами після коми)'),
  1491 + 'tree_crown_density' => $this->text()->comment('Щільність (ажурність) крони дерев'),
  1492 + 'tree_crown_height' => $this->decimal()->comment('Висота крони дерев (у метрах; з двома цифрами після коми)'),
  1493 + 'tree_lane_distance' => $this->decimal()->comment('Відстань міждеревами в ряду (у метрах; з двома цифрами після коми)'),
  1494 + 'area' => $this->decimal()->comment('Площа (у квадратних метрах; з двома цифрами після коми)'),
  1495 + 'year_build' => $this->text()->comment('Рік висадження'),
  1496 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1497 + 'defects' => $this->integer()->comment('Дефекти (згідно з [4])'),
  1498 + 'photo' => $this->string()->comment('Фотографії (tiff [3])'),
  1499 + 'video' => $this->string()->comment('Відео файли (mkv [3])'),
  1500 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  1501 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1502 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1503 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1504 + ]);
  1505 + $this->addCommentOnTable('planting_card', 'Дані про штучні насадження');
  1506 +
  1507 + // Table 5.71
  1508 + $this->createTable('data_collector', [
  1509 + 'data_collector_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1510 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1511 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1512 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  1513 + 'location' => $this->text()->comment('Розташування'),
  1514 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1515 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  1516 + 'defects' => $this->integer()->comment('Дефекти (згідно з [4])'),
  1517 + 'data_collector_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.72)'),
  1518 + 'link' => $this->text()->comment('Посилання на інтернет-ресурси'),
  1519 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1520 + ]);
  1521 + $this->addCommentOnTable('data_collector', 'Облікова відомість автоматичних електронних засобів збору даних');
  1522 +
  1523 + // Table 5.72
  1524 + $this->createTable('data_collector_card', [
  1525 + 'data_collector_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1526 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  1527 + 'location' => $this->text()->comment('Розташування'),
  1528 + 'data_collector_type_id' => $this->integer()->comment('Тип автоматичного електронного засобу збору даних (згідно з [4])'),
  1529 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1530 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  1531 + 'defects' => $this->integer()->comment('Дефекти (згідно з [4])'),
  1532 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1533 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1534 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1535 + 'year_build' => $this->text()->comment('Рік будівництва'),
  1536 + ]);
  1537 + $this->addCommentOnTable('data_collector_card', 'Дані про автоматичний електронний засіб збору даних');
  1538 +
  1539 + // Table 5.73
  1540 + $this->createTable('communication', [
  1541 + 'communication_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1542 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1543 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1544 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1545 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1546 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1547 + 'communication_type_id' => $this->integer()->comment('Тип комунікації (згідно з [4])'),
  1548 + 'tool_construction'=> $this->integer()->comment('Засоби прокладання (згідно з [4])'),
  1549 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1550 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  1551 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1552 + 'communication_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.74)'),
  1553 + ]);
  1554 + $this->addCommentOnTable('communication', 'Облікова відомість власних комунікацій');
  1555 +
  1556 + // Table 5.74
  1557 + $this->createTable('communication_card', [
  1558 + 'communication_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1559 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1560 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1561 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1562 + 'communication_type_id' => $this->integer()->comment('Тип комунікації (згідно з [4])'),
  1563 + 'tool_construction'=> $this->integer()->comment('Засоби прокладання (згідно з [4])'),
  1564 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1565 + 'balance_cost' => $this->decimal()->comment('Балансова вартість (у тисячах гривень; з двома цифрами після коми)'),
  1566 + 'defects' => $this->integer()->comment('Дефекти споруди (згідно з [4])'),
  1567 + 'project_organization' => $this->text()->comment('Проектна організація'),
  1568 + 'project_year' => $this->text()->comment('Рік випуску проекту'),
  1569 + 'build_organization' => $this->text()->comment('Будівельна організація'),
  1570 + 'year_build' => $this->text()->comment('Рік будівництва'),
  1571 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1572 + ]);
  1573 + $this->addCommentOnTable('communication_card', 'Дані про власну комунікацію');
  1574 +
  1575 + // Table 5.75
  1576 + $this->createTable('snow_protection', [
  1577 + 'snow_protection_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1578 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1579 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1580 + 'begin' => $this->string()->comment('Початок ділянки потенційного занесення снігом (псевдогеодані)'),
  1581 + 'end' => $this->string()->comment('Кінець ділянки потенційного занесення снігом (псевдогеодані)'),
  1582 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1583 + 'location' => $this->text()->comment('Розташування'),
  1584 + 'snow_protection_type_id' => $this->integer()->comment('Тип снігозахисних засобів (згідно з [4])'),
  1585 + 'count' => $this->integer()->comment('Потрібна кількість снігозахисних засобів'),
  1586 + ]);
  1587 + $this->addCommentOnTable('snow_protection', 'Дані про тимчасові снігозахисні засоби');
  1588 +
  1589 + // Table 5.76
  1590 + $this->createTable('topography_climate', [
  1591 + 'topography_climate_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1592 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1593 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1594 + 'condition' => $this->string()->comment('Топографічні та кліматичні умови (pdf [3])'),
  1595 + 'road_climate_zone' => $this->integer()->comment('Дорожньо-кліматична зона (згідно з Додатком Г ДБН В.2.3-4)'),
  1596 + 'climate_region' => $this->integer()->comment('Дорожньо-кліматична зона (згідно з Додатком Д ДБН В.2.3-4)'),
  1597 + ]);
  1598 + $this->addCommentOnTable('topography_climate', 'Дані про топографічні та кліматичні умови');
  1599 +
  1600 + // Table 5.77
  1601 + $this->createTable('road_complex', [
  1602 + 'road_complex_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1603 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1604 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1605 + 'begin' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  1606 + 'end' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  1607 + 'length' => $this->decimal()->comment('Довжина (у метрах; з двома цифрами після коми)'),
  1608 + 'location' => $this->text()->comment('Розташування'),
  1609 + 'nature_factor' => $this->integer()->comment('Природні фактори, що зумовлюють складність утримання (згідно з [4])'),
  1610 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1611 + ]);
  1612 + $this->addCommentOnTable('road_complex', 'Дані про ділянки дороги підвищеної складності утримання');
  1613 +
  1614 + // Table 5.78
  1615 + $this->createTable('rail_cross', [
  1616 + 'rail_cross_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1617 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1618 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1619 + 'position' => $this->string()->comment('Місце перетину з залізницею (псевдогеодані)'),
  1620 + 'level' => $this->integer()->comment('Рівень перетину з залізницею (згідно з [4])'),
  1621 + 'rail_name' => $this->text()->comment('Назва залізниці'),
  1622 + 'rail_track_count' => $this->integer()->comment('Кількість колій'),
  1623 + 'rail_electricity_availability' => $this->integer()->comment('Наявність електрифікації залізниці (згідно з [4])'),
  1624 + 'security_availability' => $this->integer()->comment('Наявність охорони (згідно з [4])'),
  1625 + 'surface_type_id' => $this->integer()->comment('Тип покриття на переїзді (згідно з [4])'),
  1626 + 'barrier_availability' => $this->integer()->comment('Наявність шлагбауму (згідно з [4])'),
  1627 + 'stop_device_availability' => $this->integer()->comment('Наявність пристроїв примусової зупинки проїзду (згідно з [4])'),
  1628 + 'traffic_light_availability' => $this->integer()->comment('Наявність світлофору (згідно з [4])'),
  1629 + 'light_availability' => $this->integer()->comment('Наявність освітлення (згідно з [4])'),
  1630 + 'train_visibility_left' => $this->decimal()->comment('Відстань видимості потягу ліворуч (у метрах; з двома цифрами після коми)'),
  1631 + 'train_visibility_right' => $this->decimal()->comment('Відстань видимості потягу праворуч (у метрах; з двома цифрами після коми)'),
  1632 + 'cross_angle' => $this->decimal()->comment('Кут перетину (в градусах; з двома цифрами після коми)'),
  1633 + 'state' => $this->integer()->comment('Стан (згідно з [4])'),
  1634 + 'defects' => $this->integer()->comment('Дефекти (згідно з [4])'),
  1635 + 'rail_direction' => $this->text()->comment('Напрямок руху залізниці'),
  1636 + 'rail_direction_vector_coords' => $this->string()->comment('Координати вектору напрямку руху (геодані)'),
  1637 + 'track_first_coords' => $this->string()->comment('Координати 1-ї колії (геодані)'),
  1638 + 'track_second_coords' => $this->string()->comment('Координати 2-ї колії (геодані)'),
  1639 + 'track_third_coords' => $this->string()->comment('Координати 3-ї колії (геодані)'),
  1640 + 'track_fourth_coords' => $this->string()->comment('Координати 4-ї колії (геодані)'),
  1641 + 'rail_overpass_coords' => $this->string()->comment('Координати залізничного шляхопроводу (геодані)'),
  1642 + ]);
  1643 + $this->addCommentOnTable('rail_cross', 'Дані про ділянки перетину із залізничними коліями');
  1644 +
  1645 + // Table 5.79
  1646 + $this->createTable('important_object', [
  1647 + 'important_object_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1648 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1649 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1650 + 'position' => $this->string()->comment('Положення (псевдогеодані)'),
  1651 + 'location' => $this->text()->comment('Розташування'),
  1652 + 'important_object_type_id' => $this->integer()->comment('Тип об’єкту (згідно з [4])'),
  1653 + 'information' => $this->text()->comment('Інформація про об\'єкт'),
  1654 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1655 + ]);
  1656 + $this->addCommentOnTable('important_object', 'Дані про важливі об’єкти дорожньої інфраструктури');
  1657 +
  1658 + // Table 5.80
  1659 + $this->createTable('communication_third', [
  1660 + 'communication_third_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1661 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1662 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1663 + 'communication_type_id' => $this->integer()->comment('Тип комунікації (згідно з [4])'),
  1664 + 'tool_construction'=> $this->integer()->comment('Засоби прокладання (згідно з [4])'),
  1665 + 'communication_third_card_id' => $this->integer()->comment('Картка споруди (окрема облікова картка; табл. 5.81)'),
  1666 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1667 + ]);
  1668 + $this->addCommentOnTable('communication_third', 'Облікова відомість комунікацій третіх осіб');
  1669 +
  1670 + // Table 5.81
  1671 + $this->createTable('communication_third_card', [
  1672 + 'communication_third_card_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1673 + 'begin' => $this->string()->comment('Початок (псевдогеодані)'),
  1674 + 'end' => $this->string()->comment('Кінець (псевдогеодані)'),
  1675 + 'communication_type_id' => $this->integer()->comment('Тип комунікації (згідно з [4])'),
  1676 + 'tool_construction'=> $this->integer()->comment('Засоби прокладання (згідно з [4])'),
  1677 + 'owner' => $this->text()->comment('Власник комунікації'),
  1678 + 'coords' => $this->string()->comment('Координати (геодані)'),
  1679 + ]);
  1680 + $this->addCommentOnTable('communication_third_card', 'Дані про комунікації третіх осіб');
  1681 +
  1682 + // Table 5.82
  1683 + $this->createTable('flow', [
  1684 + 'flow_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1685 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1686 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1687 + 'begin' => $this->string()->comment('Початок ділянки дороги зі сталим транспортним потоком (псевдогеодані)'),
  1688 + 'end' => $this->string()->comment('Кінець ділянки дороги зі сталим транспортним потоком (псевдогеодані)'),
  1689 + 'position' => $this->string()->comment('Положення пункту обліку (псевдогеодані)'),
  1690 + 'car_intensity' => $this->integer()->comment('Інтенсивність руху легкових автомобілів, в т.ч. з причепами фургонів (ціле число; в автомобілях на добу)'),
  1691 + 'truck_two_axle_intensity' => $this->integer()->comment('Інтенсивність руху вантажних 2-вісних автомобілів (ціле число; в автомобілях на добу)'),
  1692 + 'truck_three_axle_intensity' => $this->integer()->comment('Інтенсивність руху вантажних 3-вісних автомобілів (ціле число; в автомобілях на добу)'),
  1693 + 'truck_four_axle_intensity' => $this->integer()->comment('Інтенсивність руху вантажних 4-вісних автомобілів (ціле число; в автомобілях на добу)'),
  1694 + 'lorry_trailer_two_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з причепами з колісними формулами 2+1, 2+2 та 2+3 (ціле число; в автомобілях на добу)'),
  1695 + 'lorry_trailer_three_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з причепами з колісними формулами 3+2 та 3+3 (ціле число; в автомобілях на добу)'),
  1696 + 'lorry_semitrailer_two_one_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з напівпричепами з колісною формулою 2+1 (ціле число; в автомобілях на добу)'),
  1697 + 'lorry_semitrailer_two_two_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з напівпричепами з колісною формулою 2+2 (ціле число; в автомобілях на добу)'),
  1698 + 'lorry_semitrailer_two_three_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з напівпричепами з колісною формулою 2+3 (ціле число; в автомобілях на добу)'),
  1699 + 'lorry_semitrailer_three_one_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з напівпричепами з колісними формулами 3+1 та 3+2 (ціле число; в автомобілях на добу)'),
  1700 + 'lorry_semitrailer_three_three_intensity' => $this->integer()->comment('Інтенсивність руху автопоїздів з напівпричепами з колісною формулою 3+3 (ціле число; в автомобілях на добу)'),
  1701 + 'bus_intensity' => $this->integer()->comment('Інтенсивність руху автобусів (ціле число; в автомобілях на добу)'),
  1702 + 'trailer_intensity' => $this->integer()->comment('Інтенсивність руху автотрейлерів низькорамних з кількістю осей 7 та більше (ціле число; в автомобілях на добу)'),
  1703 + 'total_intensity' => $this->integer()->comment('Загальна інтенсивність руху (ціле число; в автомобілях на добу)'),
  1704 + 'capacity' => $this->integer()->comment('Пропускна здатність (ціле число; в автомобілях на добу)'),
  1705 + 'stock_coef' => $this->decimal()->comment('Коефіцієнт запасу (з двома цифрами після коми)'),
  1706 + 'coords' => $this->string()->comment('Координати ділянки із сталим транспортним потоком (геодані)'),
  1707 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1708 + ]);
  1709 + $this->addCommentOnTable('flow', 'Дані про транспортні потоки');
  1710 +
  1711 + // Table 5.83
  1712 + $this->createTable('speed_limit', [
  1713 + 'speed_limit_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1714 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1715 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1716 + 'begin' => $this->string()->comment('Початок ділянки дороги з однаковими умовами руху (псевдогеодані)'),
  1717 + 'end' => $this->string()->comment('Кінець ділянки дороги з однаковими умовами руху (псевдогеодані)'),
  1718 + 'road_category_id' => $this->integer()->comment('Категорія дороги (згідно з [4])'),
  1719 + 'forward_speed' => $this->decimal()->comment('Середня швидкість руху транспортного потоку в прямому напрямку (в кілометрах за годину; з двома цифрами після коми)'),
  1720 + 'back_speed' => $this->decimal()->comment('Середня швидкість руху транспортного потоку в зворотному напрямку (в кілометрах за годину; з двома цифрами після коми)'),
  1721 + 'forward_coords' => $this->string()->comment('Координати ділянки з однаковими умовами руху в прямому напрямку (геодані)'),
  1722 + 'back_coords' => $this->string()->comment('Координати ділянки з однаковими умовами руху в зворотному напрямку (геодані)'),
  1723 + 'date_actual' => $this->integer()->comment('Дата актуалізації (згідно з [4])'),
  1724 + ]);
  1725 + $this->addCommentOnTable('speed_limit', 'Дані про швидкісні режими руху');
  1726 +
  1727 + // Table 5.84
  1728 + $this->createTable('visibility_danger', [
  1729 + 'visibility_danger_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1730 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1731 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1732 + 'begin' => $this->string()->comment('Початок ділянки дороги з однаковими умовами руху (псевдогеодані)'),
  1733 + 'end' => $this->string()->comment('Кінець ділянки дороги з однаковими умовами руху (псевдогеодані)'),
  1734 + 'road_category_id' => $this->integer()->comment('Категорія дороги (згідно з [4])'),
  1735 + 'visibility_oncoming_standard' => $this->decimal()->comment('Нормативна відстань видимості зустрічного транспортного засобу (у метрах; згідно з 4.6 ДБН В.2.3-4)'),
  1736 + 'forward_vivibility' => $this->integer()->comment('Фактична просторова видимість зустрічного транспорту в прямому напрямку руху (у метрах)'),
  1737 + 'back_vivibility' => $this->integer()->comment('Фактична просторова видимість зустрічного транспорту в зворотному напрямку руху (у метрах)'),
  1738 + 'safe_speed' => $this->decimal()->comment('Величина безпечної швидкості руху (в кілометрах за годину; з двома цифрами після коми)'),
  1739 + 'conclusion' => $this->text()->comment('Висновок'),
  1740 + ]);
  1741 + $this->addCommentOnTable('visibility_danger', 'Дані про ділянки з незабезпеченою просторовою видимістю');
  1742 +
  1743 + // Table 5.85
  1744 + $this->createTable('road_accident', [
  1745 + 'road_accident_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [4])'),
  1746 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [5])'),
  1747 + 'coords' => $this->string()->comment('Координати місця ДТП (геодані)'),
  1748 + ]);
  1749 + $this->addCommentOnTable('road_accident', 'Журнал ДТП');
  1750 +
  1751 + // СОУ 42.1-37641918-063_2016
  1752 + // Table А.1
  1753 + $this->createTable('road_maintenance_finance_plan', [
  1754 + 'road_maintenance_finance_plan_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [3])'),
  1755 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [3])'),
  1756 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1757 + 'begin' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  1758 + 'end' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  1759 + 'finance_value' => $this->decimal()->comment('Величина нормативного фінансування (в тисячах гривень; з двома цифрами після коми)'),
  1760 + 'inflation_coef' => $this->decimal()->comment('Коефіцієнт інфляції (з двома цифрами після коми)'),
  1761 + 'coords' => $this->string()->comment('Координати (згідно 6.2.2.17 СОУ 42.1-37641918-122)'),
  1762 + 'date_actual' => $this->integer()->comment('Дата актуалізації (табл. Б.104)'),
  1763 + ]);
  1764 + $this->addCommentOnTable('road_maintenance_finance_plan', 'Планове фінансування утримання доріг');
  1765 +
  1766 + // Table А.2
  1767 + $this->createTable('road_maintenance_finance_fact', [
  1768 + 'road_maintenance_finance_fact_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [3])'),
  1769 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [3])'),
  1770 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1771 + 'begin' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  1772 + 'end' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  1773 + 'finance_value' => $this->decimal()->comment('Величина нормативного фінансування (в тисячах гривень; з двома цифрами після коми)'),
  1774 + 'coords' => $this->string()->comment('Координати (згідно 6.2.2.17 СОУ 42.1-37641918-122)'),
  1775 + 'date_actual' => $this->integer()->comment('Дата актуалізації (табл. Б.104)'),
  1776 + ]);
  1777 + $this->addCommentOnTable('road_maintenance_finance_fact', 'Фактичне фінансування утримання доріг');
  1778 +
  1779 + // Table А.3
  1780 + $this->createTable('road_maintenance_state', [
  1781 + 'road_maintenance_state_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [3])'),
  1782 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [3])'),
  1783 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1784 + 'begin' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  1785 + 'end' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  1786 + 'coords' => $this->string()->comment('Координати (згідно 6.2.2.17 СОУ 42.1-37641918-122)'),
  1787 + 'defect_description' => $this->text()->comment('Опис виявленого недоліку'),
  1788 + 'date_add' => $this->integer()->comment('Дата створення запису (табл. Б.104)'),
  1789 + 'user_add_id' => $this->integer()->comment('ЕПІН автора повідомлення про факт недоліку'),
  1790 + 'photo' => $this->string()->comment('Фотографії (tiff [2])'),
  1791 + 'video' => $this->string()->comment('Відео файли (avi [2])'),
  1792 + 'date_remove' => $this->integer()->comment('Дата та час ліквідації виявленого недоліку (табл. Б.104)'),
  1793 + 'user_remove_id' => $this->integer()->comment('ЕПІН автора повідомлення про факт ліквідації недоліку'),
  1794 + ]);
  1795 + $this->addCommentOnTable('road_maintenance_state', 'Протокол стану утримання');
  1796 +
  1797 + // Table А.4
  1798 + $this->createTable('critical_situation', [
  1799 + 'critical_situation_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [3])'),
  1800 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [3])'),
  1801 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1802 + 'begin' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  1803 + 'end' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  1804 + 'coords' => $this->string()->comment('Координати (згідно 6.2.2.17 СОУ 42.1-37641918-122)'),
  1805 + 'critical_situation_type' => $this->text()->comment('Тип критичної ситуації'),
  1806 + 'critical_situation_description' => $this->text()->comment('Опис виявленої критичної ситуації'),
  1807 + 'date_add' => $this->integer()->comment('Дата створення запису (табл. Б.104)'),
  1808 + 'user_add_id' => $this->integer()->comment('ЕПІН автора повідомлення про факт недоліку'),
  1809 + 'date_remove' => $this->integer()->comment('Дата та час ліквідації виявленого недоліку (табл. Б.104)'),
  1810 + 'user_remove_id' => $this->integer()->comment('ЕПІН автора повідомлення про факт ліквідації недоліку'),
  1811 + ]);
  1812 + $this->addCommentOnTable('critical_situation', 'Протокол критичної ситуації');
  1813 +
  1814 + // Table А.5
  1815 + $this->createTable('repair_work', [
  1816 + 'repair_work_id' => $this->primaryKey()->comment('Індекс титулу (згідно з [3])'),
  1817 + 'road_name' => $this->string()->comment('Назва автомобільної дороги або під\'їзду (обходу, транспортної розв\'язки) в складі титулу (згідно з [3])'),
  1818 + 'cross_section_number' => $this->integer()->comment('Номер з\'їзду транспортної розв\'язки'),
  1819 + 'begin' => $this->string()->comment('Початок ділянки (псевдогеодані)'),
  1820 + 'end' => $this->string()->comment('Кінець ділянки (псевдогеодані)'),
  1821 + 'coords' => $this->string()->comment('Координати (згідно 6.2.2.17 СОУ 42.1-37641918-122)'),
  1822 + 'repair_work_type' => $this->text()->comment('Тип ремонтних робіт'),
  1823 + 'date_begin' => $this->integer()->comment('Дата початку ремонтних робіт (табл. Б.104)'),
  1824 + 'date_end' => $this->integer()->comment('Дата закінчення ремонтних робіт (табл. Б.104)'),
  1825 + 'project_material' => $this->string()->comment('Проектні матеріали (tiff [2])'),
  1826 + 'acceptance_act' => $this->string()->comment('Акт приймання робіт (введення в експлуатацію тощо) (tiff [2])'),
  1827 + ]);
  1828 + $this->addCommentOnTable('repair_work', 'Протокол ремонтних робіт');
  1829 +
  1830 + // Table Б.1
  1831 + $this->createTable('horizontal_curve_direction', [
  1832 + 'horizontal_curve_direction_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1833 + 'value' => $this->string()->comment('Значення'),
  1834 + ]);
  1835 + $this->addCommentOnTable('horizontal_curve_direction', 'Напрямок горизонтальної кривої');
  1836 + $this->batchInsert('horizontal_curve_direction', [ 'value' ], [
  1837 + [ 'праворуч' ],
  1838 + [ 'ліворуч' ],
  1839 + ]);
  1840 +
  1841 + // Table Б.2
  1842 + $this->createTable('movement_direction', [
  1843 + 'movement_direction_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1844 + 'value' => $this->string()->comment('Значення'),
  1845 + ]);
  1846 + $this->addCommentOnTable('movement_direction', 'Напрямок руху по дорозі');
  1847 + $this->batchInsert('movement_direction', [ 'value' ], [
  1848 + [ 'в обох' ],
  1849 + [ 'прямий' ],
  1850 + [ 'зворотний' ],
  1851 + ]);
  1852 +
  1853 + // Table Б.3
  1854 + $this->createTable('position_according_road', [
  1855 + 'position_according_road_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1856 + 'value' => $this->string()->comment('Значення'),
  1857 + ]);
  1858 + $this->addCommentOnTable('position_according_road', 'Розташування відносно дороги');
  1859 + $this->batchInsert('position_according_road', [ 'value' ], [
  1860 + [ 'праворуч' ],
  1861 + [ 'ліворуч' ],
  1862 + ]);
  1863 +
  1864 + // Table Б.4
  1865 + $this->createTable('availability', [
  1866 + 'availability_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1867 + 'value' => $this->string()->comment('Значення'),
  1868 + ]);
  1869 + $this->addCommentOnTable('availability', 'Наявність/відсутність будь-чого');
  1870 + $this->batchInsert('availability', [ 'value' ], [
  1871 + [ 'так' ],
  1872 + [ 'ні' ],
  1873 + ]);
  1874 +
  1875 + // Table Б.5
  1876 + $this->createTable('road_type', [
  1877 + 'road_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1878 + 'value' => $this->string()->comment('Значення'),
  1879 + ]);
  1880 + $this->addCommentOnTable('road_type', 'Індекс автомобільної дороги (стаття 8, Закон України "Про автомобільні дороги")');
  1881 + $this->batchInsert('road_type', [ 'value' ], [
  1882 + [ 'М (міжнародна)' ],
  1883 + [ 'Н (національна)' ],
  1884 + [ 'Р (регіональна)' ],
  1885 + [ 'Т (територіальна)' ],
  1886 + [ 'О (обласна)' ],
  1887 + [ 'С (районна)' ],
  1888 + ]);
  1889 +
  1890 + // Table Б.6
  1891 + $this->createTable('road_category', [
  1892 + 'road_category_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1893 + 'value' => $this->string()->comment('Значення'),
  1894 + ]);
  1895 + $this->addCommentOnTable('road_category', 'Категорія автомобільної дороги (ДБН В.2.3-4, табл. 4.1)');
  1896 + $this->batchInsert('road_category', [ 'value' ], [
  1897 + [ 'І-а' ],
  1898 + [ 'І-б' ],
  1899 + [ 'ІІ' ],
  1900 + [ 'ІІІ' ],
  1901 + [ 'IV' ],
  1902 + [ 'V' ],
  1903 + ]);
  1904 +
  1905 + // Table Б.7
  1906 + $this->createTable('state_production', [
  1907 + 'state_production_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1908 + 'value' => $this->string()->comment('Значення'),
  1909 + ]);
  1910 + $this->addCommentOnTable('state_production', 'Стан виробничого об’єкту, машини або механізму');
  1911 + $this->batchInsert('state_production', [ 'value' ], [
  1912 + [ 'непрацездатний (під списання)' ],
  1913 + [ 'непрацездатний (ведуться ремонтні роботи)' ],
  1914 + [ 'непрацездатний (законсервований)' ],
  1915 + [ 'працездатний, в стані очікування' ],
  1916 + [ 'працездатний (ведеться виробництво)' ],
  1917 + ]);
  1918 +
  1919 + // Table Б.8
  1920 + $this->createTable('bitumen_storage_type', [
  1921 + 'bitumen_storage_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1922 + 'value' => $this->string()->comment('Значення'),
  1923 + ]);
  1924 + $this->addCommentOnTable('bitumen_storage_type', 'Тип бітумосховища ([4, розділ 8])');
  1925 + $this->batchInsert('bitumen_storage_type', [ 'value' ], [
  1926 + [ 'бітумосховище тимчасового типу' ],
  1927 + [ 'бітумосховище стаціонарного типу' ],
  1928 + [ 'підземне бітумосховище' ],
  1929 + [ 'напівпідземне бітумосховище' ],
  1930 + [ 'наземне бітумосховище' ],
  1931 + [ 'бітумосховище з місцевим нагріванням' ],
  1932 + [ 'бітумосховище із загальним нагріванням' ],
  1933 + ]);
  1934 +
  1935 + // Table Б.9
  1936 + $this->createTable('state', [
  1937 + 'state_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1938 + 'value' => $this->string()->comment('Значення'),
  1939 + ]);
  1940 + $this->addCommentOnTable('state', 'Стан об’єкту');
  1941 + $this->batchInsert('state', [ 'value' ], [
  1942 + [ 'працездатний' ],
  1943 + [ 'непрацездатний' ],
  1944 + ]);
  1945 +
  1946 + // Table Б.10
  1947 + $this->createTable('storage_type', [
  1948 + 'storage_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1949 + 'value' => $this->string()->comment('Значення'),
  1950 + ]);
  1951 + $this->addCommentOnTable('storage_type', 'Тип складу');
  1952 + $this->batchInsert('storage_type', [ 'value' ], [
  1953 + [ 'відкритий' ],
  1954 + [ 'закритий' ],
  1955 + ]);
  1956 +
  1957 + // Table Б.11
  1958 + $this->createTable('vehicle_type', [
  1959 + 'vehicle_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1960 + 'value' => $this->string()->comment('Значення'),
  1961 + 'note' => $this->text()->comment('Примітки'),
  1962 + ]);
  1963 + $this->addCommentOnTable('vehicle_type', 'Тип машини (механізму)');
  1964 + $this->batchInsert('vehicle_type', [ 'value', 'note' ], [
  1965 + [ 'автобус', '[5]' ],
  1966 + [ 'автогудронатор', '' ],
  1967 + [ 'асфальтоукладач', '' ],
  1968 + [ 'бульдозер', '' ],
  1969 + [ 'вантажний автомобіль', '[5]' ],
  1970 + [ 'грейдер', '' ],
  1971 + [ 'грейдер-елеватор', '' ],
  1972 + [ 'екскаватор на гусеничному ходу', '' ],
  1973 + [ 'екскаватор на колісному ходу', '' ],
  1974 + [ 'кран підйомний на гусеничному ходу', '' ],
  1975 + [ 'кран підйомний на колісному ходу', '' ],
  1976 + [ 'навантажувач', '' ],
  1977 + [ 'машина дорожня комбінована', '' ],
  1978 + [ 'машина піскорозкидальна', '' ],
  1979 + [ 'машина снігоочисна роторна', '' ],
  1980 + [ 'причіп', '[5]' ],
  1981 + [ 'скрепер', '' ],
  1982 + [ 'трактор на гусеничному ходу', '' ],
  1983 + [ 'трактор на колісному ходу', '' ],
  1984 + [ 'фреза дорожня', '' ],
  1985 + ]);
  1986 +
  1987 + // Table Б.12
  1988 + $this->createTable('obstacle_up', [
  1989 + 'obstacle_up_id' => $this->primaryKey()->comment('Ідентифікатор'),
  1990 + 'value' => $this->string()->comment('Значення'),
  1991 + 'note' => $this->text()->comment('Примітки'),
  1992 + ]);
  1993 + $this->addCommentOnTable('obstacle_up', 'Назва перешкоди обмеження габариту по висоті');
  1994 + $this->batchInsert('obstacle_up', [ 'value', 'note' ], [
  1995 + [ 'портал тунелю', '[6]' ],
  1996 + [ 'міст', '[ДБН В.2.3-22]' ],
  1997 + [ 'надземний пішохідний перехід', '[7]' ],
  1998 + [ 'підвісна канатна дорога', '[8]' ],
  1999 + [ 'проїзна арка', '' ],
  2000 + [ 'дорожній знак на тросі-розтяжці', '[9]' ],
  2001 + [ 'портал-ферма', '[10]' ],
  2002 + [ 'трубопровід', '[11]' ],
  2003 + [ 'лінія зв\'язку повітряна', '[12]' ],
  2004 + [ 'ЛЕП повітряна 0,4 кВ', '[12]' ],
  2005 + [ 'ЛЕП повітряна 10 кВ', '[12]' ],
  2006 + [ 'ЛЕП повітряна 25 кВ', '[12]' ],
  2007 + [ 'ЛЕП повітряна 35 кВ', '[12]' ],
  2008 + [ 'ЛЕП повітряна 110 кВ', '[12]' ],
  2009 + [ 'ЛЕП повітряна 150 кВ', '[12]' ],
  2010 + [ 'ЛЕП повітряна 330 кВ', '[12]' ],
  2011 + ]);
  2012 +
  2013 + // Table Б.13
  2014 + $this->createTable('land_soil', [
  2015 + 'land_soil_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2016 + 'value' => $this->string()->comment('Значення'),
  2017 + ]);
  2018 + $this->addCommentOnTable('land_soil', 'Ґрунт земляного полотна (6.2 ДБН В.2.3-4)');
  2019 + $this->batchInsert('land_soil', [ 'value' ], [
  2020 + [ 'глина' ],
  2021 + [ 'глина жирна' ],
  2022 + [ 'глина піщаниста' ],
  2023 + [ 'глина пилувата' ],
  2024 + [ 'глина напівжирна' ],
  2025 + [ 'глинистий сланець' ],
  2026 + [ 'гравій' ],
  2027 + [ 'ґрунт галечниковий' ],
  2028 + [ 'ґрунт галечниковий із суглинистим заповнювачем' ],
  2029 + [ 'ґрунт гравійний із суглинистим заповнювачем' ],
  2030 + [ 'ґрунт з жорствою' ],
  2031 + [ 'ґрунт щебенистий із суглинистим заповнювачем' ],
  2032 + [ 'каштанові землі вологі' ],
  2033 + [ 'каштанові землі змішані' ],
  2034 + [ 'лес вологий' ],
  2035 + [ 'лес затверділий' ],
  2036 + [ 'лес злежаний' ],
  2037 + [ 'лес рихлий' ],
  2038 + [ 'мергель' ],
  2039 + [ 'пісок крупний' ],
  2040 + [ 'пісок дрібний' ],
  2041 + [ 'пісок пилуватий' ],
  2042 + [ 'сланець глинистий' ],
  2043 + [ 'солончак' ],
  2044 + [ 'суглинок' ],
  2045 + [ 'суглинок важкий' ],
  2046 + [ 'суглинок важкий з галькою' ],
  2047 + [ 'суглинок легкий' ],
  2048 + [ 'суглинок легкий пилуватий' ],
  2049 + [ 'суглинок супіщаний' ],
  2050 + [ 'суглинок щебенистий' ],
  2051 + [ 'супісок' ],
  2052 + [ 'супісок важкий пилуватий' ],
  2053 + [ 'супісок легкий крупний' ],
  2054 + [ 'супісок пилуватий' ],
  2055 + [ 'торф' ],
  2056 + [ 'піщаник' ],
  2057 + [ 'піщаник вивітрілий' ],
  2058 + [ 'вапняк' ],
  2059 + [ 'вапняк вивітрілий' ],
  2060 + [ 'жорства' ],
  2061 + ]);
  2062 +
  2063 + // Table Б.14
  2064 + $this->createTable('state_common', [
  2065 + 'state_common_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2066 + 'value' => $this->string()->comment('Значення'),
  2067 + ]);
  2068 + $this->addCommentOnTable('state_common', 'Стан простого об’єкту');
  2069 + $this->batchInsert('state_common', [ 'value' ], [
  2070 + [ 'добрий' ],
  2071 + [ 'задовільний' ],
  2072 + [ 'незадовільний' ],
  2073 + [ 'непрацездатний' ],
  2074 + [ 'аварійний' ],
  2075 + ]);
  2076 +
  2077 + // Table Б.15
  2078 + $this->createTable('ventilation_type', [
  2079 + 'ventilation_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2080 + 'value' => $this->string()->comment('Значення'),
  2081 + ]);
  2082 + $this->addCommentOnTable('ventilation_type', 'Тип вентиляції тунелів та підземних пішохідних переходів');
  2083 + $this->batchInsert('ventilation_type', [ 'value' ], [
  2084 + [ 'примусова' ],
  2085 + [ 'природня' ],
  2086 + ]);
  2087 +
  2088 + // Table Б.16
  2089 + $this->createTable('light_type', [
  2090 + 'light_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2091 + 'value' => $this->string()->comment('Значення'),
  2092 + ]);
  2093 + $this->addCommentOnTable('light_type', 'Тип освітлення тунелів та підземних пішохідних переходів');
  2094 + $this->batchInsert('light_type', [ 'value' ], [
  2095 + [ 'штучне' ],
  2096 + [ 'природне' ],
  2097 + ]);
  2098 +
  2099 + // Table Б.17
  2100 + $this->createTable('antiseismic_type', [
  2101 + 'antiseismic_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2102 + 'value' => $this->string()->comment('Значення'),
  2103 + ]);
  2104 + $this->addCommentOnTable('antiseismic_type', 'Тип антисейсмічних пристроїв (ДБН В.2.3-22, [13, 14, 26, 28])');
  2105 + $this->batchInsert('antiseismic_type', [ 'value' ], [
  2106 + [ 'відсутній' ],
  2107 + [ 'комбінації повздовжніх і поперечних обмежувачів' ],
  2108 + [ 'комбіноване використання спеціальних опорних частин з обмежувачами переміщень' ],
  2109 + [ 'обмежувачі повздовжніх переміщень прогонових будов' ],
  2110 + [ 'обмежувачі поперечних переміщень прогонових будов на опорах' ],
  2111 + [ 'спеціальні антисейсмічні опорні частини' ],
  2112 + ]);
  2113 +
  2114 + // Table Б.18
  2115 + $this->createTable('communication_type', [
  2116 + 'communication_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2117 + 'value' => $this->string()->comment('Значення'),
  2118 + ]);
  2119 + $this->addCommentOnTable('communication_type', 'Тип комунікації, що перепускаються штучною спорудою');
  2120 + $this->batchInsert('communication_type', [ 'value' ], [
  2121 + [ 'відсутня' ],
  2122 + [ 'водогін' ],
  2123 + [ 'кабель електричний' ],
  2124 + [ 'кабель зв’язку' ],
  2125 + ]);
  2126 +
  2127 + // Table Б.19
  2128 + $this->createTable('header_purpose', [
  2129 + 'header_purpose_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2130 + 'value' => $this->string()->comment('Значення'),
  2131 + ]);
  2132 + $this->addCommentOnTable('header_purpose', 'Призначення оголовка (портала)');
  2133 + $this->batchInsert('header_purpose', [ 'value' ], [
  2134 + [ 'вхідний' ],
  2135 + [ 'вихідний' ],
  2136 + ]);
  2137 +
  2138 + // Table Б.20
  2139 + $this->createTable('header_type', [
  2140 + 'header_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2141 + 'value' => $this->string()->comment('Значення'),
  2142 + ]);
  2143 + $this->addCommentOnTable('header_type', 'Тип оголовка (портала) (ДБН В.2.3-22, [13, 14, 26, 28])');
  2144 + $this->batchInsert('header_type', [ 'value' ], [
  2145 + [ 'портальний' ],
  2146 + [ 'розтрубний' ],
  2147 + [ 'комірцевий' ],
  2148 + [ 'коридорний прямий' ],
  2149 + [ 'коридорний з сходовими клітинами' ],
  2150 + ]);
  2151 +
  2152 + // Table Б.21
  2153 + $this->createTable('body_material', [
  2154 + 'body_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2155 + 'value' => $this->string()->comment('Значення'),
  2156 + ]);
  2157 + $this->addCommentOnTable('body_material', 'Матеріали тіла штучних споруд (ДБН В.2.3-22, [13, 14, 26, 28])');
  2158 + $this->batchInsert('body_material', [ 'value' ], [
  2159 + [ 'бетон' ],
  2160 + [ 'бетон і бутобетон' ],
  2161 + [ 'бетон і залізобетон' ],
  2162 + [ 'бетон і кам`яна кладка' ],
  2163 + [ 'бутобетон' ],
  2164 + [ 'бутобетон, бетон,залізобетон' ],
  2165 + [ 'гофрований метал' ],
  2166 + [ 'деревина' ],
  2167 + [ 'залізобетон' ],
  2168 + [ 'кам`яна (цегляна) кладка і залізобетон' ],
  2169 + [ 'кам`яна кладка' ],
  2170 + [ 'метал' ],
  2171 + [ 'металеві тюбінги' ],
  2172 + [ 'попередньонапружений залізобетон' ],
  2173 + [ 'сталезалізобетон' ],
  2174 + [ 'цегляна кладка' ],
  2175 + ]);
  2176 +
  2177 + // Table Б.22
  2178 + $this->createTable('foundation_material', [
  2179 + 'foundation_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2180 + 'value' => $this->string()->comment('Значення'),
  2181 + ]);
  2182 + $this->addCommentOnTable('foundation_material', 'Матеріали тіла штучних споруд (ДБН В.2.3-22, [13, 14, 26, 28])');
  2183 + $this->batchInsert('foundation_material', [ 'value' ], [
  2184 + [ 'бетон' ],
  2185 + [ 'бетон і бутобетон' ],
  2186 + [ 'бетон і залізобетон' ],
  2187 + [ 'бетон і кам`яна кладка' ],
  2188 + [ 'бутобетон' ],
  2189 + [ 'бутобетон, бетон,залізобетон' ],
  2190 + [ 'гофрований метал' ],
  2191 + [ 'деревина' ],
  2192 + [ 'залізобетон' ],
  2193 + [ 'кам`яна (цегляна) кладка і залізобетон' ],
  2194 + [ 'кам`яна кладка' ],
  2195 + [ 'метал' ],
  2196 + [ 'попередньонапружений залізобетон' ],
  2197 + [ 'сталезалізобетон' ],
  2198 + [ 'цегляна кладка' ],
  2199 + ]);
  2200 +
  2201 + // Table Б.23
  2202 + $this->createTable('basement_material', [
  2203 + 'basement_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2204 + 'value' => $this->string()->comment('Значення'),
  2205 + ]);
  2206 + $this->addCommentOnTable('basement_material', 'Матеріали основи під фундамент (ДБН В.2.3-22, [13, 14, 26, 28])');
  2207 + $this->batchInsert('basement_material', [ 'value' ], [
  2208 + [ 'піщано-гравійна суміш' ],
  2209 + [ 'пісок' ],
  2210 + [ 'щебінь' ],
  2211 + ]);
  2212 +
  2213 + // Table Б.24
  2214 + $this->createTable('fortified_slope_material', [
  2215 + 'fortified_slope_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2216 + 'value' => $this->string()->comment('Значення'),
  2217 + ]);
  2218 + $this->addCommentOnTable('fortified_slope_material', 'Матеріали укріплення укосів земляного полотна на штучних спорудах (ДБН В.2.3-22, [13, 14, 26, 28])');
  2219 + $this->batchInsert('fortified_slope_material', [ 'value' ], [
  2220 + [ 'без укріплення' ],
  2221 + [ 'бетон' ],
  2222 + [ 'бетонна обрешітка із засипкою щебенем' ],
  2223 + [ 'бутобетон' ],
  2224 + [ 'габіони' ],
  2225 + [ 'залізобетонна решітка, монолітний бетон' ],
  2226 + [ 'залізобетонні плити' ],
  2227 + [ 'збірні бетонні блоки' ],
  2228 + [ 'кам`яний накид' ],
  2229 + [ 'матрац Рено' ],
  2230 + [ 'монолітний бетон' ],
  2231 + [ 'підпірна стінка' ],
  2232 + [ 'посів трав' ],
  2233 + ]);
  2234 +
  2235 + // Table Б.25
  2236 + $this->createTable('body_type', [
  2237 + 'body_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2238 + 'value' => $this->string()->comment('Значення'),
  2239 + ]);
  2240 + $this->addCommentOnTable('body_type', 'Типи форми тіла штучних споруд (ДБН В.2.3-22, [13, 14, 26, 28])');
  2241 + $this->batchInsert('body_type', [ 'value' ], [
  2242 + [ 'арочна' ],
  2243 + [ 'закритий лоток овоідального типу' ],
  2244 + [ 'закритий лоток трапецевидного типу' ],
  2245 + [ 'кругла' ],
  2246 + [ 'овальна' ],
  2247 + [ 'прямокутна' ],
  2248 + [ 'склепінчаста' ],
  2249 + ]);
  2250 +
  2251 + // Table Б.26
  2252 + $this->createTable('span_scheme', [
  2253 + 'span_scheme_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2254 + 'value' => $this->string()->comment('Значення'),
  2255 + ]);
  2256 + $this->addCommentOnTable('span_scheme', 'Статичні схеми прогонових будов (ДБН В.2.3-22, [13, 14, 26, 28])');
  2257 + $this->batchInsert('span_scheme', [ 'value' ], [
  2258 + [ 'арочна' ],
  2259 + [ 'балочна консольна з підвісками' ],
  2260 + [ 'балочна нерозрізна' ],
  2261 + [ 'балочна однопрогонова з подвійною консольною балкою' ],
  2262 + [ 'балочна розрізна' ],
  2263 + [ 'балочно-консольна' ],
  2264 + [ 'вантова' ],
  2265 + [ 'висяча' ],
  2266 + [ 'комбінована' ],
  2267 + [ 'консольно-підвісна' ],
  2268 + [ 'рамна' ],
  2269 + [ 'рамно-консольна' ],
  2270 + ]);
  2271 +
  2272 + // Table Б.27
  2273 + $this->createTable('span_type', [
  2274 + 'span_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2275 + 'value' => $this->string()->comment('Значення'),
  2276 + ]);
  2277 + $this->addCommentOnTable('span_type', 'Типи конструкцій прогонових будов (ДБН В.2.3-22, [13, 14, 26, 28])');
  2278 + $this->batchInsert('span_type', [ 'value' ], [
  2279 + [ 'арочна зовнішньо безрозпірна з проїздом по низу двотаврового перерізу' ],
  2280 + [ 'арочна зовнішньо безрозпірна з проїздом посередині двотаврогого перерізу' ],
  2281 + [ 'арочна зовнішньо безрозпірна з проїздом посередині коробчатого перерізу' ],
  2282 + [ 'арочна зовнішньо безрозпірна з проїздом посередині прямокутного перерізу' ],
  2283 + [ 'арочна зовнішньо розпірна з проїздом посередині коробчатого перерізу' ],
  2284 + [ 'арочна зовнішньо розпірна з проїздом по верху двутаврового перерізу' ],
  2285 + [ 'арочна зовнішньо розпірна з проїздом по верху прямокутного перерізу' ],
  2286 + [ 'арочна зовнішньо розпірна з проїздом по верху у вигляді спарених двотаврів' ],
  2287 + [ 'арочна зовнішньо розпірна з проїздом посередині прямокутного перерізу' ],
  2288 + [ 'арочна комбінована консольна' ],
  2289 + [ 'арочна комбінована нерозрізна' ],
  2290 + [ 'арочна комбінована посилена балкою жорсткості' ],
  2291 + [ 'арочна комбінована посилена ланцюгом' ],
  2292 + [ 'арочна система із затяжкою в комбінації з консольними балками' ],
  2293 + [ 'арочна трьохшарнірна' ],
  2294 + [ 'висяча вантова ферма гнучка променева система' ],
  2295 + [ 'висяча вантова ферма гнучка система Жискляра' ],
  2296 + [ 'висяча вантова ферма гнучка система Рабіновича' ],
  2297 + [ 'висяча вантова ферма гнучка система Росновського' ],
  2298 + [ 'висяча вантова ферма жорстка з паралельними поясами' ],
  2299 + [ 'висяча вантова ферма жорстка з серповидним обрисом' ],
  2300 + [ 'висяча вантова ферма комбінована з наскрізною балкою жорсткості з паралельними поясами' ],
  2301 + [ 'висяча вантова ферма комбінована з наскрізною балкою жорсткості змінної висоти' ],
  2302 + [ 'висяча вантова ферма комбінована з суцільної балкою жорсткості коробчастого перерізу з приопорним потовщенням' ],
  2303 + [ 'висяча вантова ферма комбінована з суцільної балкою жорсткості коробчатого перерізу з паралельними поясами' ],
  2304 + [ 'висяча вантова ферма комбінована з суцільної балкою жорсткості таврового перерізу з паралельними поясами' ],
  2305 + [ 'висяча гнучка кабельна' ],
  2306 + [ 'висяча гнучка комбінована з поздовжньою балкою в рівні проїзної частини' ],
  2307 + [ 'висяча гнучка комбінована з поздовжньою фермою в рівні проїзної частини (перилами)' ],
  2308 + [ 'висяча гнучка ланцюгова' ],
  2309 + [ 'дерев\'яна двохпідкосна' ],
  2310 + [ 'дерев\'яна з двохярусними прогонами' ],
  2311 + [ 'дерев\'яна з одноярусними прогонами з проїздом на баласті' ],
  2312 + [ 'дерев\'яна з одноярусними прогонами з проїздом по поперечинах' ],
  2313 + [ 'дерев\'яна однопідкосна' ],
  2314 + [ 'дерев\'яна пакетна з гнучкими шпонками' ],
  2315 + [ 'дерев\'яна пакетна на дубових шпонках' ],
  2316 + [ 'дерев\'яна ферма Гау-Журавського' ],
  2317 + [ 'дерев\'яна ферма дощата' ],
  2318 + [ 'дерев\'яна ферма хрестова' ],
  2319 + [ 'жорстка рамна' ],
  2320 + [ 'збірна ребриста бездіафрагмова з таврових балок з каркасною арматури, випуск 56доп' ],
  2321 + [ 'збірна ребриста з пучкової арматури випуск 122-62' ],
  2322 + [ 'збірна ребриста з Т-подібних балок з каркасною арматурою вип.56' ],
  2323 + [ 'збірна ребриста струнобетонна ВТП-15' ],
  2324 + [ 'збірна ребриста струнобетонна ВТП-16' ],
  2325 + [ 'збірна ребриста струнобетонна типовий проект 149-62 Союздорпроект' ],
  2326 + [ 'коробчаста багатоконтурна з вигнутою формою зовнішніх стінок' ],
  2327 + [ 'коробчаста багатоконтурна з опуклою формою нижньої плити' ],
  2328 + [ 'коробчаста багатоконтурна з похилими гранями' ],
  2329 + [ 'коробчаста з криволінійними стінками' ],
  2330 + [ 'коробчаста одно-контурна з вигнутою формою зовнішніх стінок' ],
  2331 + [ 'коробчаста одно-контурна з опуклою формою нижньої плити' ],
  2332 + [ 'коробчаста одно-контурна з похилими гранями' ],
  2333 + [ 'одностоякова рама' ],
  2334 + [ 'плитна з поздовжніми пустотами круглої форми' ],
  2335 + [ 'плитна з поздовжніми пустотами прямокутної форми' ],
  2336 + [ 'плитна з поздовжніми пустотами циліндричної форми' ],
  2337 + [ 'плитна з поперечними пустотами' ],
  2338 + [ 'плитна збірна двохпустотна з напруженою арматурою, сб. ВТП-21' ],
  2339 + [ 'плитна збірна з прогонових плит, ВТП-16' ],
  2340 + [ 'плитна збірна струнобетонна з плит суцільного перерізу' ],
  2341 + [ 'плитна змінної висоти в поздовжньому перерізі' ],
  2342 + [ 'плитна змінної висоти в поперечному перерізі' ],
  2343 + [ 'плитна змінної висоти в поперечному та поздовжньому перерізах' ],
  2344 + [ 'плитна суцільного перерізу' ],
  2345 + [ 'плитна типова збірна Белгіпродор випуск 5-04-145' ],
  2346 + [ 'плитно-ребриста з діафрагмами з ребрами таврового перерізу' ],
  2347 + [ 'плитно-ребриста конструкція' ],
  2348 + [ 'рама V-образного типу з окремими нахиленими стоянами' ],
  2349 + [ 'рама V-образного типу на кінцях сполучені шарніром' ],
  2350 + [ 'рама з двома шарнірними нахиленими стоянами' ],
  2351 + [ 'рама з нахиленими стоянами' ],
  2352 + [ 'рама з шарнірними одиночними нахиленими стоянами' ],
  2353 + [ 'рами з жорстким закріпленням' ],
  2354 + [ 'рами з шарнірним закріпленням' ],
  2355 + [ 'ребриста бездіафрагмова з ребрами V-подібного перерізу' ],
  2356 + [ 'ребриста бездіафрагмова з ребрами двотаврового перерізу' ],
  2357 + [ 'ребриста бездіафрагмова з ребрами П-подібного перерізу' ],
  2358 + [ 'ребриста бездіафрагмова з ребрами таврового перерізу' ],
  2359 + [ 'ребриста бездіафрагмова криволінійного обрису (змінної висоти в приопорних зонах)' ],
  2360 + [ 'ребриста з діафрагмами з ребрами двотаврового перерізу з ломаним обрисом поясів' ],
  2361 + [ 'ребриста з діафрагмами з ребрами двотаврого перерізу з паралельними поясами' ],
  2362 + [ 'ребриста з діафрагмами з ребрами П-подібного перерізу' ],
  2363 + [ 'ребриста з діафрагмами з ребрами таврового перерізу' ],
  2364 + [ 'ребриста з діафрагмами з ребрами таврового перерізу з криволійним обрисом поясів' ],
  2365 + [ 'ребриста з діафрагмами криволінійного обрису (змінної висоти в приопорних зонах)' ],
  2366 + [ 'ребриста із збірних уніфікованих попередньо-напружених балок' ],
  2367 + [ 'склепіння несиметричне' ],
  2368 + [ 'склепіння симетричне' ],
  2369 + [ 'Т-подібна рамна з омоноліченими кінцями консоль між собою' ],
  2370 + [ 'Т-подібна рамна шарнірно сполучена у середині прогонів' ],
  2371 + [ 'ферма з проїздом по низу з полігональними поясами з трикутними решітками із шпренгелями' ],
  2372 + [ 'ферма з проїздом по верху з паралельними поясами багаторешітчата' ],
  2373 + [ 'ферма з проїздом по верху з паралельними поясами двохрешітчата' ],
  2374 + [ 'ферма з проїздом по верху з паралельними поясами з трикутними решітками' ],
  2375 + [ 'ферма з проїздом по верху з полігональними поясами з трикутними решітками' ],
  2376 + [ 'ферма з проїздом по низу з паралельними поясами з трикутними решітками із шпренгелями' ],
  2377 + [ 'ферма з проїздом по низу з полігональними поясами двохрешітчата' ],
  2378 + [ 'ферма арочна з горизонтальним верхнім поясом з проїздом по верху' ],
  2379 + [ 'ферма з проїздом по верху арочна з паралельними поясами із розкосою решіткою' ],
  2380 + [ 'ферма з проїздом по верху арочна з паралельними поясами із трикутною решіткою' ],
  2381 + [ 'ферма з проїздом по верху арочна серповидного обрису' ],
  2382 + [ 'ферма з проїздом по верху з паралельними поясами багаторозкісна' ],
  2383 + [ 'ферма з проїздом по верху з паралельними поясами з напіврозкісними решітками' ],
  2384 + [ 'ферма з проїздом по верху з паралельними поясами з розкісними решітками' ],
  2385 + [ 'ферма з проїздом по верху з паралельними поясами з ромбоподібними решітками' ],
  2386 + [ 'ферма з проїздом по верху з паралельними поясами з трикутними решітками із шпренгелями' ],
  2387 + [ 'ферма з проїздом по верху з паралельними поясами з хрестовими решітками' ],
  2388 + [ 'ферма з проїздом по верху з паралельними поясами системи Скугорева' ],
  2389 + [ 'ферма з проїздом по верху з полігональними поясами двохрешітчата' ],
  2390 + [ 'ферма з проїздом по верху з полігональними поясами з напіврозкісними решітками' ],
  2391 + [ 'ферма з проїздом по верху з полігональними поясами з розкісними решітками' ],
  2392 + [ 'ферма з проїздом по верху з полігональними поясами з трикутними решітками із шпренгелями' ],
  2393 + [ 'ферма з проїздом по верху з полігональними поясами з хрестовими решітками' ],
  2394 + [ 'ферма з проїздом по низу арочна зі збільшеною висотою у опор' ],
  2395 + [ 'ферма з проїздом по низу арочна зі збільшеною висотою у чвертях прольоту' ],
  2396 + [ 'ферма з проїздом по низу арочна портальна з розкосою решіткою' ],
  2397 + [ 'ферма з проїздом по низу арочна портальна з трикутною решіткою' ],
  2398 + [ 'ферма з проїздом по низу з паралельними поясами багаторозкісна' ],
  2399 + [ 'ферма з проїздом по низу з паралельними поясами двохрешітчата' ],
  2400 + [ 'ферма з проїздом по низу з паралельними поясами з багаторешітчата' ],
  2401 + [ 'ферма з проїздом по низу з паралельними поясами з напіврозкісними решітками' ],
  2402 + [ 'ферма з проїздом по низу з паралельними поясами з розкісними решітками' ],
  2403 + [ 'ферма з проїздом по низу з паралельними поясами з трикутними решітками' ],
  2404 + [ 'ферма з проїздом по низу з паралельними поясами з хрестовими решітками' ],
  2405 + [ 'ферма з проїздом по низу з полігональними поясами багаторозкісна' ],
  2406 + [ 'ферма з проїздом по низу з полігональними поясами з напіврозкісними решітками' ],
  2407 + [ 'ферма з проїздом по низу з полігональними поясами з розкісними решітками' ],
  2408 + [ 'ферма з проїздом по низу з полігональними поясами з трикутними решітками' ],
  2409 + [ 'ферма з проїздом по низу з полігональними поясами з хрестовими решітками' ],
  2410 + [ 'ферма з проїздом по низу серповидного обрису з суцільною стінкою' ],
  2411 + [ 'ферма з проїздом посередині серповидного обрису' ],
  2412 + [ 'ферма з паралельними поясами з ромбоподібними решітками з проїздом по низу' ],
  2413 + ]);
  2414 +
  2415 + // Table Б.28
  2416 + $this->createTable('load_project', [
  2417 + 'load_project_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2418 + 'value' => $this->string()->comment('Значення'),
  2419 + ]);
  2420 + $this->addCommentOnTable('load_project', 'Проектне навантаження (ДБН В.2.3-22, [13, 14, 26, 28])');
  2421 + $this->batchInsert('load_project', [ 'value' ], [
  2422 + [ 'А11, НК80' ],
  2423 + [ 'А14, НК80' ],
  2424 + [ 'А15, НК100' ],
  2425 + [ 'А15, НК80' ],
  2426 + [ 'Н8, НГ30' ],
  2427 + [ 'Н8, НГ60' ],
  2428 + [ 'Н10, НГ60' ],
  2429 + [ 'H13, НГ30' ],
  2430 + [ 'Н13, НГ60' ],
  2431 + [ 'Н18, НК80' ],
  2432 + [ 'Н30, НК80' ],
  2433 + [ 'С10' ],
  2434 + [ 'С14' ],
  2435 + [ 'від пішоходів 400 кг/м 2' ],
  2436 + [ 'від потоку води' ],
  2437 + ]);
  2438 +
  2439 + // Table Б.29
  2440 + $this->createTable('bearing_moving_type', [
  2441 + 'bearing_moving_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2442 + 'value' => $this->string()->comment('Значення'),
  2443 + ]);
  2444 + $this->addCommentOnTable('bearing_moving_type', 'Типи рухомих опорних частин (ДБН В.2.3-22, [13, 14, 26, 28])');
  2445 + $this->batchInsert('bearing_moving_type', [ 'value' ], [
  2446 + [ 'валкова' ],
  2447 + [ 'комбінована' ],
  2448 + [ 'листова з металу' ],
  2449 + [ 'плоска' ],
  2450 + [ 'поліуретанова' ],
  2451 + [ 'гумова' ],
  2452 + [ 'руберойдова' ],
  2453 + [ 'тангенціальна' ],
  2454 + [ 'гумово-металева' ],
  2455 + [ 'секторна' ],
  2456 + ]);
  2457 +
  2458 + // Table Б.30
  2459 + $this->createTable('bearing_not_moving_type', [
  2460 + 'bearing_not_moving_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2461 + 'value' => $this->string()->comment('Значення'),
  2462 + ]);
  2463 + $this->addCommentOnTable('bearing_not_moving_type', 'Типи нерухомих опорних частин (ДБН В.2.3-22, [13, 14, 26, 28])');
  2464 + $this->batchInsert('bearing_not_moving_type', [ 'value' ], [
  2465 + [ 'комбінована' ],
  2466 + [ 'листова з металу' ],
  2467 + [ 'плоска' ],
  2468 + [ 'поліуретанова' ],
  2469 + [ 'гумова' ],
  2470 + [ 'руберойдова' ],
  2471 + [ 'тангенціальна' ],
  2472 + [ 'гумово-металева' ],
  2473 + ]);
  2474 +
  2475 + // Table Б.31
  2476 + $this->createTable('cross_joint_type', [
  2477 + 'cross_joint_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2478 + 'value' => $this->string()->comment('Значення'),
  2479 + ]);
  2480 + $this->addCommentOnTable('cross_joint_type', 'Спосіб поперечного об\'єднання прогонових будов (ДБН В.2.3-22, [13, 14, 26, 28])');
  2481 + $this->batchInsert('cross_joint_type', [ 'value' ], [
  2482 + [ 'шпонковий' ],
  2483 + ]);
  2484 +
  2485 + // Table Б.32
  2486 + $this->createTable('pillar_type', [
  2487 + 'pillar_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2488 + 'value' => $this->string()->comment('Значення'),
  2489 + ]);
  2490 + $this->addCommentOnTable('pillar_type', 'Типи конструкцій опор (ДБН В.2.3-22, [13, 14, 26, 28])');
  2491 + $this->batchInsert('pillar_type', [ 'value' ], [
  2492 + [ 'А-подібний пілон' ],
  2493 + [ 'Н-подібний пілон' ],
  2494 + [ 'берегова обсипна стійкова дворядна' ],
  2495 + [ 'берегова аркова масивна опора' ],
  2496 + [ 'берегова лежнева кутового профілю на гравійній подушці' ],
  2497 + [ 'берегова лежнева кутового профілю на щебеневій подушці' ],
  2498 + [ 'берегова лежнева плоска на гравійній подушці' ],
  2499 + [ 'берегова лежнева плоска на піщаній подушці' ],
  2500 + [ 'берегова лежнева плоска на щебеневій подушці' ],
  2501 + [ 'берегова лежнева кутового профілю на піщаній подушці' ],
  2502 + [ 'берегова масивна з боковими відкрилками' ],
  2503 + [ 'берегова масивна з оберненими стінками' ],
  2504 + [ 'берегова масивна ребриста' ],
  2505 + [ 'берегова масивна обсипна з боковими відкрилками' ],
  2506 + [ 'берегова масивна обсипна з прорізом' ],
  2507 + [ 'берегова масивна обсипна монолітна' ],
  2508 + [ 'берегова масивна обсипна монолітна полегшена' ],
  2509 + [ 'берегова масивна обсипна монолітна полегшена з боковими відкрилками' ],
  2510 + [ 'берегова масивна обсипна пальова-стовпчаста' ],
  2511 + [ 'берегова масивна обсипна стовпчаста' ],
  2512 + [ 'берегова масивна обсипна стоякова' ],
  2513 + [ 'берегова масивна опора-стінка' ],
  2514 + [ 'берегова масивна стовпчаста обсипна козлового типу' ],
  2515 + [ 'берегова масивна тонка стінка' ],
  2516 + [ 'берегова обсипна арочна опора' ],
  2517 + [ 'берегова обсипна арочна опора коробчастого типу' ],
  2518 + [ 'берегова обсипна пальова дворядна' ],
  2519 + [ 'берегова обсипна пальова козлового типу' ],
  2520 + [ 'берегова обсипна пальова однорядна' ],
  2521 + [ 'берегова опора з боковим прорізом' ],
  2522 + [ 'берегова опора коробчастого типу' ],
  2523 + [ 'берегова пальова двохрядна' ],
  2524 + [ 'берегова пальова двохрядна із забірною стінкою' ],
  2525 + [ 'берегова пальова однорядна із забірною стінкою' ],
  2526 + [ 'берегова полегшена опора-стінка (сист. Cловінського)' ],
  2527 + [ 'берегова стовпчаста V- подібна' ],
  2528 + [ 'дерев\'яна M-подібна' ],
  2529 + [ 'дерев\'яна баштова' ],
  2530 + [ 'дерев\'яна з похилими палями' ],
  2531 + [ 'дерев\'яна з укосинами' ],
  2532 + [ 'дерев\'яна із двох напівбиків' ],
  2533 + [ 'дерев\'яна із двох напівбиків з похилими стояками' ],
  2534 + [ 'дерев\'яна із двох напівбиків з укосинами' ],
  2535 + [ 'дерев\'яна лежнева на гравійній подушці' ],
  2536 + [ 'дерев\'яна лежнева на піщаній подушці' ],
  2537 + [ 'дерев\'яна лежнева на щебеневій подушці' ],
  2538 + [ 'дерев\'яна пальова' ],
  2539 + [ 'дерев\'яна рамно-лежнева' ],
  2540 + [ 'дерев\'яна рамнопальова' ],
  2541 + [ 'дерев\'яна ряжева' ],
  2542 + [ 'дерев\'яний рамно-пальовий бик' ],
  2543 + [ 'опора рамно-нерозрізної системи' ],
  2544 + [ 'проміжна одностовпчаста прямокутного перерізу' ],
  2545 + [ 'проміжна пальова стійкова однорядна' ],
  2546 + [ 'проміжна "масивний бик"' ],
  2547 + [ 'проміжна двостійкова' ],
  2548 + [ 'проміжна двостійкова з рамною надбудовою' ],
  2549 + [ 'проміжна двостійкова із паль-оболонок' ],
  2550 + [ 'проміжна двостовпчаста' ],
  2551 + [ 'проміжна двостовпчаста телескопічна' ],
  2552 + [ 'проміжна з пальових-стовпів' ],
  2553 + [ 'проміжна масивна "двохярусний бик"' ],
  2554 + [ 'проміжна масивна арочна' ],
  2555 + [ 'проміжна масивна двостовпчаста' ],
  2556 + [ 'проміжна масивна із вертикальних паль-оболонок' ],
  2557 + [ 'проміжна масивна із похилих паль-оболонок' ],
  2558 + [ 'проміжна масивна несиметрична арочна опора' ],
  2559 + [ 'проміжна масивна опора-стінка' ],
  2560 + [ 'проміжна масивна полегшена опора' ],
  2561 + [ 'проміжна масивна полегшений бик з консолями' ],
  2562 + [ 'проміжна масивна стоякова козлова' ],
  2563 + [ 'проміжна масивна телескопічна' ],
  2564 + [ 'проміжна монолітна рамна з вертикальними стійками' ],
  2565 + [ 'проміжна монолітна рамна з похилими стійками' ],
  2566 + [ 'проміжна одностовпчаста' ],
  2567 + [ 'проміжна опора консольно-підвісної системи' ],
  2568 + [ 'проміжна опора, що хитається' ],
  2569 + [ 'проміжна опора-стінка' ],
  2570 + [ 'проміжна пальова двохрядна' ],
  2571 + [ 'проміжна пальова двохрядна з насадками' ],
  2572 + [ 'проміжна пальова двохрядна із захисною обробкою' ],
  2573 + [ 'проміжна пальова однорядна' ],
  2574 + [ 'проміжна пальова однорядна з насадками' ],
  2575 + [ 'проміжна пальова однорядна із захисною обробкою' ],
  2576 + [ 'проміжна пальова однорядна об\'єднана монолітним бетоном із захисними з/б плитами' ],
  2577 + [ 'проміжна пальова стійкова двохрядна' ],
  2578 + [ 'проміжна пальова стійкова однорядна' ],
  2579 + [ 'проміжна полегшена арочна опора' ],
  2580 + [ 'проміжна стійкова металева зі стійками двотаврового перерізу' ],
  2581 + [ 'проміжна стійкова металева зі стійками коробчастого перерізу' ],
  2582 + [ 'проміжна стовпчаста' ],
  2583 + [ 'проміжна стовпчаста V-подібна' ],
  2584 + [ 'проміжна стовпчаста на опускних колодязях' ],
  2585 + [ 'проміжна стовпчаста телескопічна' ],
  2586 + [ 'проміжна трьохстовпчата з двохконсольним ригелем' ],
  2587 + [ 'проміжна чотирьохстоякова рамна опора' ],
  2588 + ]);
  2589 +
  2590 + // Table Б.33
  2591 + $this->createTable('pillar_body_material', [
  2592 + 'pillar_body_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2593 + 'value' => $this->string()->comment('Значення'),
  2594 + ]);
  2595 + $this->addCommentOnTable('pillar_body_material', 'Матеріали тіла опор (ДБН В.2.3-22, [13, 14, 26, 28])');
  2596 + $this->batchInsert('pillar_body_material', [ 'value' ], [
  2597 + [ 'збірний залізобетон' ],
  2598 + [ 'монолітний залізобетон' ],
  2599 + [ 'металева оболонка з заповненням монолітним бетоном' ],
  2600 + [ 'бутобетон' ],
  2601 + [ 'кам\'яна кладка' ],
  2602 + [ 'деревина (кругляк)' ],
  2603 + [ 'деревина (клеєна)' ],
  2604 + [ 'різнорідний' ],
  2605 + ]);
  2606 +
  2607 + // Table Б.34
  2608 + $this->createTable('pillar_foundation_type', [
  2609 + 'pillar_foundation_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2610 + 'value' => $this->string()->comment('Значення'),
  2611 + ]);
  2612 + $this->addCommentOnTable('pillar_foundation_type', 'Типи фундаментів опор (ДБН В.2.3-22, [13, 14, 26, 28])');
  2613 + $this->batchInsert('pillar_foundation_type', [ 'value' ], [
  2614 + [ 'мілкого закладання на природній основі' ],
  2615 + [ 'мілкого закладання на штучній основі' ],
  2616 + [ 'масивний глибокого закладання на природній основі' ],
  2617 + [ 'масивний глибокого закладання на штучній основі' ],
  2618 + [ 'стовпчастий вертикальний з повним заповненням' ],
  2619 + [ 'стовпчастий вертикальний з заповненням у вигляді потовщення стін/низький' ],
  2620 + [ 'стовпчастий вертикальний з заповненням у вигляді бетонних пробок' ],
  2621 + [ 'стовпчастий вертикальний з заповненням у вигляді діафрагм' ],
  2622 + [ 'стовпчастий вертикальний з ґрунтовим ядром' ],
  2623 + [ 'стовпчастий похилий з повним заповненням' ],
  2624 + [ 'стовпчастий похилий з заповненням у вигляді потовщення стін' ],
  2625 + [ 'стовпчастий похилий з заповненням у вигляді бетонних пробок' ],
  2626 + [ 'стовпчастий похилий з заповненням у вигляді діафрагм' ],
  2627 + [ 'стовпчастий похилий з ґрунтовим ядром' ],
  2628 + [ 'пальовий з низьким ростверком однорядний на забивних палях' ],
  2629 + [ 'пальовий однорядний з низьким ростверком на пустотілих палях' ],
  2630 + [ 'пальовий однорядний з низьким ростверком на гвинтових палях суцільного перерізу' ],
  2631 + [ 'пальовий однорядний з низьким ростверком на гвинтових палях прямокутного перерізу' ],
  2632 + [ 'пальовий однорядний з низьким ростверком на гвинтових палях круглого перерізу' ],
  2633 + [ 'пальовий однорядний з низьким ростверком на дрібно гвинтових палях' ],
  2634 + [ 'пальовий однорядний з низьким ростверком на палях змішаного типу' ],
  2635 + [ 'пальовий однорядний з низьким ростверком на набивних палях з рифленою поверхнею' ],
  2636 + [ 'пальовий однорядний з низьким ростверком на набивних палях з п`ятою розширення нижнього кінця палі' ],
  2637 + [ 'пальовий однорядний з низьким ростверком на палях виделково-кореневої форми' ],
  2638 + [ 'пальовий однорядний з низьким ростверком на палях багато виделкової кореневої форми' ],
  2639 + [ 'пальовий однорядний з низьким ростверком на палях фігурної форми з розширенням в середній частині' ],
  2640 + [ 'пальовий однорядний з низьким ростверком на палях фігурної форми з розширенням в різних місцях по висоті палі' ],
  2641 + [ 'пальовий однорядний з низьким ростверком на бурових палях-стовпах' ],
  2642 + [ 'пальовий однорядний з низьким ростверком на буро набивних суцільного перерізу' ],
  2643 + [ 'пальовий однорядний з низьким ростверком на бурових палях' ],
  2644 + [ 'пальовий однорядний з низьким ростверком на буро набивних суцільного перерізу з розширеннями' ],
  2645 + [ 'пальовий однорядний з низьким ростверком на буро опускних палях з камуфлетною п`ятою' ],
  2646 + [ 'пальовий однорядний з низьким ростверком на буро набивних порожнистих круглих палях' ],
  2647 + [ 'пальовий однорядний з низьким ростверком на буро набивних камуфлетних палях' ],
  2648 + [ 'пальовий однорядний з низьким ростверком на буро набивних з ущільненим вибоєм' ],
  2649 + [ 'пальовий однорядний з низьким ростверком на буро ін’єкційних палях' ],
  2650 + [ 'вертикальний опускний колодязь' ],
  2651 + [ 'похилий опускний колодязь' ],
  2652 + [ 'східчастий опускний колодязь' ],
  2653 + [ 'кесон' ],
  2654 + [ 'пальовий багаторядний з низьким ростверком на пустотілих палях' ],
  2655 + [ 'пальовий багаторядний з низьким ростверком на гвинтових палях суцільного перерізу' ],
  2656 + [ 'пальовий однорядний з високим ростверком на гвинтових палях суцільного перерізу' ],
  2657 + [ 'пальовий багаторядний з високим ростверком на гвинтових палях суцільного перерізу' ],
  2658 + [ 'пальовий з високим ростверком однорядний на забивних палях' ],
  2659 + [ 'пальовий з низьким ростверком багаторядний на забивних палях' ],
  2660 + [ 'пальовий з високим ростверком багаторядний на забивних палях' ],
  2661 + [ 'пальовий багаторядний з низьким ростверком на гвинтових палях круглого перерізу' ],
  2662 + [ 'пальовий однорядний з високим ростверком на гвинтових палях круглого перерізу' ],
  2663 + [ 'пальовий багаторядний з високим ростверком на гвинтових палях круглого перерізу' ],
  2664 + [ 'пальовий багаторядний з низьким ростверком на гвинтових палях прямокутного перерізу' ],
  2665 + [ 'пальовий однорядний з високим ростверком на гвинтових палях прямокутного перерізу' ],
  2666 + [ 'пальовий багаторядний з високим ростверком на гвинтових палях прямокутного перерізу' ],
  2667 + [ 'пальовий багаторядний з низьким ростверком на дрібно гвинтових палях' ],
  2668 + [ 'пальовий однорядний з високим ростверком на дрібно гвинтових палях' ],
  2669 + [ 'пальовий багаторядний з високим ростверком на дрібно гвинтових палях' ],
  2670 + [ 'пальовий багаторядний з низьким ростверком на палях змішаного типу' ],
  2671 + [ 'пальовий однорядний з високим ростверком на палях змішаного типу' ],
  2672 + [ 'пальовий багаторядний з високим ростверком на палях змішаного типу' ],
  2673 + [ 'пальовий однорядний' ],
  2674 + [ 'пальовий багаторядний' ],
  2675 + ]);
  2676 +
  2677 + // Table Б.35
  2678 + $this->createTable('icebreaker_type', [
  2679 + 'icebreaker_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2680 + 'value' => $this->string()->comment('Значення'),
  2681 + ]);
  2682 + $this->addCommentOnTable('icebreaker_type', 'Тип льодорізів (ДБН В.2.3-22, [13, 14, 26, 28])');
  2683 + $this->batchInsert('icebreaker_type', [ 'value' ], [
  2684 + [ 'аванпостний' ],
  2685 + [ 'передопорний' ],
  2686 + ]);
  2687 +
  2688 + // Table Б.36
  2689 + $this->createTable('icebreaker_material', [
  2690 + 'icebreaker_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2691 + 'value' => $this->string()->comment('Значення'),
  2692 + ]);
  2693 + $this->addCommentOnTable('icebreaker_material', 'Матеріал льодорізів (ДБН В.2.3-22, [13, 14, 26, 28])');
  2694 + $this->batchInsert('icebreaker_material', [ 'value' ], [
  2695 + [ 'збірний залізобетон' ],
  2696 + [ 'монолітний залізобетон' ],
  2697 + [ 'сталебетон' ],
  2698 + [ 'кам\'яна кладка' ],
  2699 + [ 'метал' ],
  2700 + [ 'дерево (кругляк)' ],
  2701 + [ 'дерево (клеєне)' ],
  2702 + [ 'різнорідний' ],
  2703 + ]);
  2704 +
  2705 + // Table Б.37
  2706 + $this->createTable('wall_material', [
  2707 + 'wall_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2708 + 'value' => $this->string()->comment('Значення'),
  2709 + ]);
  2710 + $this->addCommentOnTable('wall_material', 'Матеріал стін будівлі (ДБН В.2.3-22, [13, 14, 26, 28])');
  2711 + $this->batchInsert('wall_material', [ 'value' ], [
  2712 + [ 'збірний залізобетон' ],
  2713 + [ 'монолітний залізобетон' ],
  2714 + [ 'цегляна кладка' ],
  2715 + [ 'кам\'яна кладка' ],
  2716 + [ 'дерево кругле' ],
  2717 + [ 'дерев\'яний каркас з обшивкою' ],
  2718 + [ 'метал – зварена арматура' ],
  2719 + [ 'метал профільований' ],
  2720 + [ 'метал – зварена рама з заскленням' ],
  2721 + ]);
  2722 +
  2723 + // Table Б.38
  2724 + $this->createTable('roof_material', [
  2725 + 'roof_material_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2726 + 'value' => $this->string()->comment('Значення'),
  2727 + ]);
  2728 + $this->addCommentOnTable('roof_material', 'Матеріал даху будівлі (ДБН В.2.3-22, [13, 14, 26, 28])');
  2729 + $this->batchInsert('roof_material', [ 'value' ], [
  2730 + [ 'збірний залізобетон' ],
  2731 + [ 'дерев\'яний каркас з обшивкою' ],
  2732 + [ 'дерев\'яний каркас з обшивкою та черепицею' ],
  2733 + [ 'дерев\'яний каркас з обшивкою та металевою черепицею' ],
  2734 + [ 'дерев\'яний каркас з обшивкою та гофрованим шифером' ],
  2735 + [ 'дерев\'яний каркас з обшивкою та гофрованою пластмасою' ],
  2736 + [ 'металевий каркас з заскленням' ],
  2737 + [ 'комірчата пластмаса (марлон)' ],
  2738 + ]);
  2739 +
  2740 + // Table Б.39
  2741 + $this->createTable('drainage_type', [
  2742 + 'drainage_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2743 + 'value' => $this->string()->comment('Значення'),
  2744 + ]);
  2745 + $this->addCommentOnTable('drainage_type', 'Типи водовідведення');
  2746 + $this->batchInsert('drainage_type', [ 'value' ], [
  2747 + [ 'за рахунок поперечних та повздовжніх похилі проїзжої частини' ],
  2748 + [ 'з використанням водовідвідних трубок' ],
  2749 + [ 'з використанням зливової каналізації відкритого типу' ],
  2750 + [ 'з використанням зливової каналізації закритого типу' ],
  2751 + ]);
  2752 +
  2753 + // Table Б.40
  2754 + $this->createTable('span_project', [
  2755 + 'span_project_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2756 + 'value' => $this->string()->comment('Значення'),
  2757 + ]);
  2758 + $this->addCommentOnTable('span_project', 'Типові проекти прогонових будов (ДБН В.2.3-22, [13, 14, 26, 28])');
  2759 + $this->batchInsert('span_project', [ 'value' ], [
  2760 + [ 'індивідуальний' ],
  2761 + [ '3.503.1-102' ],
  2762 + [ '3.503.1-75' ],
  2763 + [ '3.503-29' ],
  2764 + [ '932-1-КЖИ' ],
  2765 + [ 'ВБК 32-95' ],
  2766 + [ 'Вип. 137 "Союздорпроект"' ],
  2767 + [ 'Випуск 3.503-23' ],
  2768 + [ 'Випуск 122-63' ],
  2769 + [ 'Випуск 149-62' ],
  2770 + [ 'Випуск 167' ],
  2771 + [ 'Випуск 29' ],
  2772 + [ 'Випуск 3.0503-12' ],
  2773 + [ 'Випуск 3.503.1-53' ],
  2774 + [ 'Випуск 3.503.1-58' ],
  2775 + [ 'Випуск 3.503.1-79' ],
  2776 + [ 'Випуск 3.503.1-93' ],
  2777 + [ 'Випуск 3.503-2' ],
  2778 + [ 'Випуск 384 сер.3.0503.12' ],
  2779 + [ 'Випуск 384/43' ],
  2780 + [ 'Випуск 384/45' ],
  2781 + [ 'Випуск 384/46' ],
  2782 + [ 'Випуск 56' ],
  2783 + [ 'Випуск 56-доповнення' ],
  2784 + [ 'Випуск 70' ],
  2785 + [ 'Випуск No332/1' ],
  2786 + [ 'Випуск No338/1' ],
  2787 + [ 'Випуск ІІ' ],
  2788 + [ 'Випуск-31' ],
  2789 + [ 'Відповідно до СПД' ],
  2790 + [ 'ВСК 31-87' ],
  2791 + [ 'ВТП 17 „Укрдіпродор”' ],
  2792 + [ 'ВТП 21-77' ],
  2793 + [ 'ВТП 21-79' ],
  2794 + [ 'ВТП 21-83' ],
  2795 + [ 'ВТП 21-86' ],
  2796 + [ 'ВТП-15' ],
  2797 + [ 'ВТП-16' ],
  2798 + [ 'ВТП-21' ],
  2799 + [ 'ВТП-26' ],
  2800 + [ 'ВТП-27/4М-85' ],
  2801 + [ 'Індивідуальний проект 1895 р.' ],
  2802 + [ 'Серія 3.503.1-61' ],
  2803 + [ 'Серія 3.503.1-81 випуск 5-5, 6-1' ],
  2804 + [ 'Серія 3.503.9-43/89' ],
  2805 + [ 'Серія 3.503-12' ],
  2806 + [ 'Серія 3.503-1-60.2' ],
  2807 + [ 'Серія 3.503-1-64.2' ],
  2808 + [ 'Серія 5-04-145' ],
  2809 + [ 'Союздорпроект "Випуск 122-62"' ],
  2810 + [ 'Союздорпроект "Випуск 143-144"' ],
  2811 + [ 'Союздорпроект "Випуск 791/6"' ],
  2812 + [ 'ТП 3.501-86' ],
  2813 + [ 'ТП 3.503-72.2' ],
  2814 + [ 'ТП 5-04-14' ],
  2815 + ]);
  2816 +
  2817 + // Table Б.41
  2818 + $this->createTable('overground_crossing_approach_type', [
  2819 + 'overground_crossing_approach_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2820 + 'value' => $this->string()->comment('Значення'),
  2821 + ]);
  2822 + $this->addCommentOnTable('overground_crossing_approach_type', 'Типи споруд підходів до надземних пішохідних переходів');
  2823 + $this->batchInsert('overground_crossing_approach_type', [ 'value' ], [
  2824 + [ 'сходи' ],
  2825 + [ 'ліфт' ],
  2826 + [ 'пандус' ],
  2827 + ]);
  2828 +
  2829 + // Table Б.42
  2830 + $this->createTable('sel_protection_type', [
  2831 + 'sel_protection_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2832 + 'value' => $this->string()->comment('Значення'),
  2833 + ]);
  2834 + $this->addCommentOnTable('sel_protection_type', 'Типи селезахисних споруд');
  2835 + $this->batchInsert('sel_protection_type', [ 'value' ], [
  2836 + [ 'накопичувальна дамба' ],
  2837 + [ 'струмененаправляюча дамба' ],
  2838 + [ 'фільтр-сепаратор' ],
  2839 + ]);
  2840 +
  2841 + // Table Б.43
  2842 + $this->createTable('culvert_obstacle_type', [
  2843 + 'culvert_obstacle_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2844 + 'value' => $this->string()->comment('Значення'),
  2845 + ]);
  2846 + $this->addCommentOnTable('culvert_obstacle_type', 'Види перешкод, які потребують водопропускних споруд');
  2847 + $this->batchInsert('culvert_obstacle_type', [ 'value' ], [
  2848 + [ 'суходіл' ],
  2849 + [ 'струмок' ],
  2850 + [ 'канал' ],
  2851 + [ 'болото' ],
  2852 + [ 'ставок' ],
  2853 + [ 'скотопрогін' ],
  2854 + [ 'з\'їзд вліво' ],
  2855 + [ 'з\'їзд вправо' ],
  2856 + ]);
  2857 +
  2858 + // Table Б.44
  2859 + $this->createTable('flow_direction', [
  2860 + 'flow_direction_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2861 + 'value' => $this->string()->comment('Значення'),
  2862 + ]);
  2863 + $this->addCommentOnTable('flow_direction', 'Напрямки течії, по відношенню до основної дороги');
  2864 + $this->batchInsert('flow_direction', [ 'value' ], [
  2865 + [ 'справа-наліво' ],
  2866 + [ 'зліва-направо' ],
  2867 + ]);
  2868 +
  2869 + // Table Б.45
  2870 + $this->createTable('culvert_element_work', [
  2871 + 'culvert_element_work_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2872 + 'value' => $this->string()->comment('Значення'),
  2873 + ]);
  2874 + $this->addCommentOnTable('culvert_element_work', 'Характер роботи водопропускного елементу');
  2875 + $this->batchInsert('culvert_element_work', [ 'value' ], [
  2876 + [ 'напірний' ],
  2877 + [ 'напівнапірний' ],
  2878 + ]);
  2879 +
  2880 + // Table Б.46
  2881 + $this->createTable('fortified_additional', [
  2882 + 'fortified_additional_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2883 + 'value' => $this->string()->comment('Значення'),
  2884 + ]);
  2885 + $this->addCommentOnTable('fortified_additional', 'Додаткові укріплення дна труб та оголовків');
  2886 + $this->batchInsert('fortified_additional', [ 'value' ], [
  2887 + [ 'цементообетонні плити омонолічені' ],
  2888 + [ 'цементообетонні плити не омонолічені' ],
  2889 + [ 'залізобетонні плити омонолічені' ],
  2890 + [ 'залізобетонні плити не омонолічені' ],
  2891 + [ 'кам\'яна кладка' ],
  2892 + [ 'монолітний цементобетон' ],
  2893 + [ 'асфальтобетон' ],
  2894 + [ 'накид каміння' ],
  2895 + ]);
  2896 +
  2897 + // Table Б.47
  2898 + $this->createTable('waterproof_type', [
  2899 + 'waterproof_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2900 + 'value' => $this->string()->comment('Значення'),
  2901 + ]);
  2902 + $this->addCommentOnTable('waterproof_type', 'Тип гідроізоляції');
  2903 + $this->batchInsert('waterproof_type', [ 'value' ], [
  2904 + [ 'оклеювальна' ],
  2905 + [ 'обмазувальна' ],
  2906 + ]);
  2907 +
  2908 + // Table Б.48
  2909 + $this->createTable('regulatory_type', [
  2910 + 'regulatory_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2911 + 'value' => $this->string()->comment('Значення'),
  2912 + ]);
  2913 + $this->addCommentOnTable('regulatory_type', 'Типи регуляційних елементів та гасників');
  2914 + $this->batchInsert('regulatory_type', [ 'value' ], [
  2915 + [ 'відсутні' ],
  2916 + [ 'водобійна яма' ],
  2917 + [ 'водобійний колодязь' ],
  2918 + [ 'водобійна стінка' ],
  2919 + [ 'лоток' ],
  2920 + [ 'перепади' ],
  2921 + [ 'швидкотік' ],
  2922 + ]);
  2923 +
  2924 + // Table Б.49
  2925 + $this->createTable('retaining_wall_type', [
  2926 + 'retaining_wall_type_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2927 + 'value' => $this->string()->comment('Значення'),
  2928 + ]);
  2929 + $this->addCommentOnTable('retaining_wall_type', 'Типи підпірних стінок (ДБН В.2.3-4)');
  2930 + $this->batchInsert('retaining_wall_type', [ 'value' ], [
  2931 + [ 'верхова' ],
  2932 + [ 'низова' ],
  2933 + ]);
  2934 +
  2935 + // Table Б.50
  2936 + $this->createTable('retaining_wall_purpose', [
  2937 + 'retaining_wall_purpose_id' => $this->primaryKey()->comment('Ідентифікатор'),
  2938 + 'value' => $this->string()->comment('Значення'),
  2939 + ]);
  2940 + $this->addCommentOnTable('retaining_wall_purpose', 'Призначення підпірних стінок (ДБН В.2.3-4)');
  2941 + $this->batchInsert('retaining_wall_purpose', [ 'value' ], [
  2942 + [ 'одягаюча' ],
  2943 + [ 'несуча' ],
  2944 + ]);
  2945 +
  2946 + }
  2947 +
  2948 + public function down()
  2949 + {
  2950 + $this->dropTable('road_surface');
  2951 + $this->dropTable('structural_layers');
  2952 + $this->dropTable('road_surface_strenght');
  2953 + $this->dropTable('road_surface_flatness');
  2954 + $this->dropTable('road_surface_clutch');
  2955 + $this->dropTable('road_surface_damage');
  2956 + $this->dropTable('roadbed_size');
  2957 + $this->dropTable('rally');
  2958 + $this->dropTable('rally_card');
  2959 + $this->dropTable('tunnel');
  2960 + $this->dropTable('tunnel_card');
  2961 + $this->dropTable('tunnel_portal_card');
  2962 + $this->dropTable('tunnel_body_card');
  2963 + $this->dropTable('sewage_card');
  2964 + $this->dropTable('technical_doc');
  2965 + $this->dropTable('bridge');
  2966 + $this->dropTable('bridge_card');
  2967 + $this->dropTable('purlin_card');
  2968 + $this->dropTable('pillar_card');
  2969 + $this->dropTable('underground_crossing');
  2970 + $this->dropTable('underground_crossing_card');
  2971 + $this->dropTable('underground_crossing_portal_card');
  2972 + $this->dropTable('underground_crossing_body_card');
  2973 + $this->dropTable('underground_crossing_add_on_card');
  2974 + $this->dropTable('overground_crossing');
  2975 + $this->dropTable('overground_crossing_card');
  2976 + $this->dropTable('overground_crossing_approach_card');
  2977 + $this->dropTable('sel_protection');
  2978 + $this->dropTable('sel_protection_card');
  2979 + $this->dropTable('drainage_pipe');
  2980 + $this->dropTable('drainage_pipe_card');
  2981 + $this->dropTable('culvert_element_card');
  2982 + $this->dropTable('header_card');
  2983 + $this->dropTable('bus_station');
  2984 + $this->dropTable('bus_station_card');
  2985 + $this->dropTable('pavilion_card');
  2986 + $this->dropTable('retaining_wall');
  2987 + $this->dropTable('retaining_wall_card');
  2988 + $this->dropTable('stabilisation_field');
  2989 + $this->dropTable('stabilisation_field_card');
  2990 + $this->dropTable('tray');
  2991 + $this->dropTable('tray_card');
  2992 + $this->dropTable('drainage');
  2993 + $this->dropTable('drainage_card');
  2994 + $this->dropTable('site');
  2995 + $this->dropTable('site_card');
  2996 + $this->dropTable('improvement_card');
  2997 + $this->dropTable('sidewalk');
  2998 + $this->dropTable('sidewalk_card');
  2999 + $this->dropTable('fence');
  3000 + $this->dropTable('fence_card');
  3001 + $this->dropTable('direct_device');
  3002 + $this->dropTable('direct_device_card');
  3003 + $this->dropTable('noise_dazzle_protection');
  3004 + $this->dropTable('dazzle_protection_card');
  3005 + $this->dropTable('noise_protection_card');
  3006 + $this->dropTable('road_sign');
  3007 + $this->dropTable('road_sign_card');
  3008 + $this->dropTable('road_mark');
  3009 + $this->dropTable('road_mark_card');
  3010 + $this->dropTable('planting');
  3011 + $this->dropTable('planting_card');
  3012 + $this->dropTable('data_collector');
  3013 + $this->dropTable('data_collector_card');
  3014 + $this->dropTable('communication');
  3015 + $this->dropTable('communication_card');
  3016 + $this->dropTable('snow_protection');
  3017 + $this->dropTable('topography_climate');
  3018 + $this->dropTable('road_complex');
  3019 + $this->dropTable('rail_cross');
  3020 + $this->dropTable('important_object');
  3021 + $this->dropTable('communication_third');
  3022 + $this->dropTable('communication_third_card');
  3023 + $this->dropTable('flow');
  3024 + $this->dropTable('speed_limit');
  3025 + $this->dropTable('visibility_danger');
  3026 + $this->dropTable('road_accident');
  3027 + }
  3028 +}
... ...
console/migrations/m130524_201442_init.php 0 → 100755
  1 +++ a/console/migrations/m130524_201442_init.php
  1 +<?php
  2 +
  3 +use yii\db\Migration;
  4 +
  5 +class m130524_201442_init extends Migration
  6 +{
  7 + public function up()
  8 + {
  9 + $tableOptions = null;
  10 + if ($this->db->driverName === 'mysql') {
  11 + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
  12 + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
  13 + }
  14 +
  15 + $this->createTable('{{%user}}', [
  16 + 'id' => $this->primaryKey(),
  17 + 'username' => $this->string()->notNull()->unique(),
  18 + 'auth_key' => $this->string(32)->notNull(),
  19 + 'password_hash' => $this->string()->notNull(),
  20 + 'password_reset_token' => $this->string()->unique(),
  21 + 'email' => $this->string()->notNull()->unique(),
  22 +
  23 + 'status' => $this->smallInteger()->notNull()->defaultValue(10),
  24 + 'created_at' => $this->integer()->notNull(),
  25 + 'updated_at' => $this->integer()->notNull(),
  26 + ], $tableOptions);
  27 + }
  28 +
  29 + public function down()
  30 + {
  31 + $this->dropTable('{{%user}}');
  32 + }
  33 +}
... ...
console/migrations/m160711_150500_flow_intensity.php 0 → 100644
  1 +++ a/console/migrations/m160711_150500_flow_intensity.php
  1 +<?php
  2 +
  3 + use yii\db\Migration;
  4 +
  5 + class m160711_150500_flow_intensity extends Migration
  6 + {
  7 +
  8 + public function up()
  9 + {
  10 + $this->createTable('flow_intensity', [
  11 + 'flow_intensity_id' => $this->primaryKey()
  12 + ->comment('Індекс'),
  13 + 'road_id' => $this->integer()
  14 + ->comment('Автомобільна дорога'),
  15 + 'region_id' => $this->integer()
  16 + ->comment('Область'),
  17 + 'location' => $this->float()
  18 + ->comment('Місцезнаходження, км+'),
  19 + 'begin' => $this->float()
  20 + ->comment('Місцезнаходження ділянки з однорідною інтенсивністю руху, км+, початок'),
  21 + 'end' => $this->float()
  22 + ->comment('Місцезнаходження ділянки з однорідною інтенсивністю руху, км+, кінець'),
  23 + 'road_direction_id' => $this->integer()
  24 + ->comment('Напрямок смуги руху'),
  25 + 'settlement_id' => $this->integer()
  26 + ->comment('Найближчий населений пункт'),
  27 + 'intensity_total' => $this->integer()
  28 + ->comment('Інтенсивність руху, авт/добу, всього'),
  29 + 'intensity_increase' => $this->integer()
  30 + ->comment('Інтенсивність руху, авт/добу, приріст'),
  31 + 'intensity_moto' => $this->integer()
  32 + ->comment('Інтенсивність руху, авт/добу, мотоцикл без коляски та мопед'),
  33 + 'intensity_moto_sidecar' => $this->integer()
  34 + ->comment('Інтенсивність руху, авт/добу, мотоцикл з коляскою'),
  35 + 'intensity_car' => $this->integer()
  36 + ->comment('Інтенсивність руху, авт/добу, легковий автомобіль'),
  37 + 'intensity_truck_two' => $this->integer()
  38 + ->comment('Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: до 2 т.'),
  39 + 'intensity_truck_two_six' => $this->integer()
  40 + ->comment('Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: від 2 т. до 6 т.'),
  41 + 'intensity_truck_six_eight' => $this->integer()
  42 + ->comment('Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: від 6 т. до 8 т.'),
  43 + 'intensity_truck_eight_fourteen' => $this->integer()
  44 + ->comment('Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: від 8 т. до 14 т.'),
  45 + 'intensity_truck_fourteen' => $this->integer()
  46 + ->comment('Інтенсивність руху, авт/добу, вантажний автомобіль вантажопідйомністю: понад 14 т.'),
  47 + 'intensity_lorry_twelve' => $this->integer()
  48 + ->comment('Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: до 12 т.'),
  49 + 'intensity_lorry_twelve_twenty' => $this->integer()
  50 + ->comment('Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: від 12 т. до 20 т.'),
  51 + 'intensity_lorry_twenty_thirty' => $this->integer()
  52 + ->comment('Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: від 20 т. до 30 т.'),
  53 + 'intensity_lorry_thirty' => $this->integer()
  54 + ->comment('Інтенсивність руху, авт/добу, автопоїзд вантажопідйомністю: понад 30 т.'),
  55 + 'intensity_tractor_under_ten' => $this->integer()
  56 + ->comment('Інтенсивність руху, авт/добу, колісний трактор з причепами до 10 т.'),
  57 + 'intensity_tractor_over_ten' => $this->integer()
  58 + ->comment('Інтенсивність руху, авт/добу, колісний трактор з причепами понад 10 т.'),
  59 + 'intensity_bus' => $this->integer()
  60 + ->comment('Інтенсивність руху, авт/добу, автобус, тролейбус'),
  61 + 'intensity_bus_coupled' => $this->integer()
  62 + ->comment('Інтенсивність руху, авт/добу, автобус зчеплений (здвоєний)'),
  63 + 'date_add' => $this->integer()
  64 + ->comment('Дата визначення'),
  65 + ]);
  66 + $this->addCommentOnTable('flow_intensity', 'Відомість інтенсивності руху та склад транспортного потоку');
  67 + $this->addForeignKey('flow_intensity_road', 'flow_intensity', 'road_id', 'road', 'road_id', 'CASCADE', 'CASCADE');
  68 + $this->addForeignKey('flow_intensity_region', 'flow_intensity', 'region_id', 'region', 'region_id', 'CASCADE', 'CASCADE');
  69 + $this->addForeignKey('flow_intensity_road_direction', 'flow_intensity', 'road_direction_id', 'road_direction', 'road_direction_id', 'CASCADE', 'CASCADE');
  70 + $this->addForeignKey('flow_intensity_settlement', 'flow_intensity', 'settlement_id', 'settlement', 'settlement_id', 'CASCADE', 'CASCADE');
  71 + }
  72 +
  73 + public function down()
  74 + {
  75 + $this->dropForeignKey('flow_intensity_road', 'flow_intensity');
  76 + $this->dropForeignKey('flow_intensity_region', 'flow_intensity');
  77 + $this->dropForeignKey('flow_intensity_road_direction', 'flow_intensity');
  78 + $this->dropForeignKey('flow_intensity_settlement', 'flow_intensity');
  79 + $this->dropTable('flow_intensity');
  80 + }
  81 + }
... ...
console/models/.gitkeep 0 → 100755
  1 +++ a/console/models/.gitkeep
  1 +*
... ...
console/runtime/.gitignore 0 → 100755
  1 +++ a/console/runtime/.gitignore
  1 +*
  2 +!.gitignore
0 3 \ No newline at end of file
... ...
environments/dev/backend/config/main-local.php 0 → 100755
  1 +++ a/environments/dev/backend/config/main-local.php
  1 +<?php
  2 +
  3 +$config = [
  4 + 'components' => [
  5 + 'request' => [
  6 + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  7 + 'cookieValidationKey' => '',
  8 + ],
  9 + ],
  10 +];
  11 +
  12 +if (!YII_ENV_TEST) {
  13 + // configuration adjustments for 'dev' environment
  14 + $config['bootstrap'][] = 'debug';
  15 + $config['modules']['debug'] = [
  16 + 'class' => 'yii\debug\Module',
  17 + ];
  18 +
  19 + $config['bootstrap'][] = 'gii';
  20 + $config['modules']['gii'] = [
  21 + 'class' => 'yii\gii\Module',
  22 + ];
  23 +}
  24 +
  25 +return $config;
... ...
environments/dev/backend/config/params-local.php 0 → 100755
  1 +++ a/environments/dev/backend/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/dev/backend/web/index-test.php 0 → 100755
  1 +++ a/environments/dev/backend/web/index-test.php
  1 +<?php
  2 +
  3 +// NOTE: Make sure this file is not accessible when deployed to production
  4 +if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
  5 + die('You are not allowed to access this file.');
  6 +}
  7 +
  8 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  9 +defined('YII_ENV') or define('YII_ENV', 'test');
  10 +
  11 +require(__DIR__ . '/../../vendor/autoload.php');
  12 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  13 +require(__DIR__ . '/../../common/config/bootstrap.php');
  14 +require(__DIR__ . '/../config/bootstrap.php');
  15 +
  16 +
  17 +$config = require(__DIR__ . '/../../tests/codeception/config/backend/acceptance.php');
  18 +
  19 +(new yii\web\Application($config))->run();
... ...
environments/dev/backend/web/index.php 0 → 100755
  1 +++ a/environments/dev/backend/web/index.php
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  3 +defined('YII_ENV') or define('YII_ENV', 'dev');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
... ...
environments/dev/common/config/main-local.php 0 → 100755
  1 +++ a/environments/dev/common/config/main-local.php
  1 +<?php
  2 +return [
  3 + 'components' => [
  4 + 'db' => [
  5 + 'class' => 'yii\db\Connection',
  6 + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
  7 + 'username' => 'root',
  8 + 'password' => '',
  9 + 'charset' => 'utf8',
  10 + ],
  11 + 'mailer' => [
  12 + 'class' => 'yii\swiftmailer\Mailer',
  13 + 'viewPath' => '@common/mail',
  14 + // send all mails to a file by default. You have to set
  15 + // 'useFileTransport' to false and configure a transport
  16 + // for the mailer to send real emails.
  17 + 'useFileTransport' => true,
  18 + ],
  19 + ],
  20 +];
... ...
environments/dev/common/config/params-local.php 0 → 100755
  1 +++ a/environments/dev/common/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/dev/console/config/main-local.php 0 → 100755
  1 +++ a/environments/dev/console/config/main-local.php
  1 +<?php
  2 +return [
  3 + 'bootstrap' => ['gii'],
  4 + 'modules' => [
  5 + 'gii' => 'yii\gii\Module',
  6 + ],
  7 +];
... ...
environments/dev/console/config/params-local.php 0 → 100755
  1 +++ a/environments/dev/console/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/dev/frontend/config/main-local.php 0 → 100755
  1 +++ a/environments/dev/frontend/config/main-local.php
  1 +<?php
  2 +
  3 +$config = [
  4 + 'components' => [
  5 + 'request' => [
  6 + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  7 + 'cookieValidationKey' => '',
  8 + ],
  9 + ],
  10 +];
  11 +
  12 +if (!YII_ENV_TEST) {
  13 + // configuration adjustments for 'dev' environment
  14 + $config['bootstrap'][] = 'debug';
  15 + $config['modules']['debug'] = [
  16 + 'class' => 'yii\debug\Module',
  17 + ];
  18 + $config['bootstrap'][] = 'gii';
  19 + $config['modules']['gii'] = [
  20 + 'class' => 'yii\gii\Module',
  21 + ];
  22 +}
  23 +
  24 +return $config;
... ...
environments/dev/frontend/config/params-local.php 0 → 100755
  1 +++ a/environments/dev/frontend/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/dev/frontend/web/index-test.php 0 → 100755
  1 +++ a/environments/dev/frontend/web/index-test.php
  1 +<?php
  2 +
  3 +// NOTE: Make sure this file is not accessible when deployed to production
  4 +if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
  5 + die('You are not allowed to access this file.');
  6 +}
  7 +
  8 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  9 +defined('YII_ENV') or define('YII_ENV', 'test');
  10 +
  11 +require(__DIR__ . '/../../vendor/autoload.php');
  12 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  13 +require(__DIR__ . '/../../common/config/bootstrap.php');
  14 +require(__DIR__ . '/../config/bootstrap.php');
  15 +
  16 +$config = require(__DIR__ . '/../../tests/codeception/config/frontend/acceptance.php');
  17 +
  18 +(new yii\web\Application($config))->run();
... ...
environments/dev/frontend/web/index.php 0 → 100755
  1 +++ a/environments/dev/frontend/web/index.php
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  3 +defined('YII_ENV') or define('YII_ENV', 'dev');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
... ...
environments/dev/tests/codeception/config/config-local.php 0 → 100755
  1 +++ a/environments/dev/tests/codeception/config/config-local.php
  1 +<?php
  2 +return [
  3 + 'components' => [
  4 + 'db' => [
  5 + 'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_tests',
  6 + 'username' => 'root',
  7 + 'password' => '',
  8 + 'charset' => 'utf8',
  9 + ],
  10 + ],
  11 +];
... ...
environments/dev/yii 0 → 100755
  1 +++ a/environments/dev/yii
  1 +#!/usr/bin/env php
  2 +<?php
  3 +/**
  4 + * Yii console bootstrap file.
  5 + *
  6 + * @link http://www.yiiframework.com/
  7 + * @copyright Copyright (c) 2008 Yii Software LLC
  8 + * @license http://www.yiiframework.com/license/
  9 + */
  10 +
  11 +defined('YII_DEBUG') or define('YII_DEBUG', true);
  12 +defined('YII_ENV') or define('YII_ENV', 'dev');
  13 +
  14 +require(__DIR__ . '/vendor/autoload.php');
  15 +require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
  16 +require(__DIR__ . '/common/config/bootstrap.php');
  17 +require(__DIR__ . '/console/config/bootstrap.php');
  18 +
  19 +$config = yii\helpers\ArrayHelper::merge(
  20 + require(__DIR__ . '/common/config/main.php'),
  21 + require(__DIR__ . '/common/config/main-local.php'),
  22 + require(__DIR__ . '/console/config/main.php'),
  23 + require(__DIR__ . '/console/config/main-local.php')
  24 +);
  25 +
  26 +$application = new yii\console\Application($config);
  27 +$exitCode = $application->run();
  28 +exit($exitCode);
... ...
environments/index.php 0 → 100755
  1 +++ a/environments/index.php
  1 +<?php
  2 +/**
  3 + * The manifest of files that are local to specific environment.
  4 + * This file returns a list of environments that the application
  5 + * may be installed under. The returned data must be in the following
  6 + * format:
  7 + *
  8 + * ```php
  9 + * return [
  10 + * 'environment name' => [
  11 + * 'path' => 'directory storing the local files',
  12 + * 'skipFiles' => [
  13 + * // list of files that should only copied once and skipped if they already exist
  14 + * ],
  15 + * 'setWritable' => [
  16 + * // list of directories that should be set writable
  17 + * ],
  18 + * 'setExecutable' => [
  19 + * // list of files that should be set executable
  20 + * ],
  21 + * 'setCookieValidationKey' => [
  22 + * // list of config files that need to be inserted with automatically generated cookie validation keys
  23 + * ],
  24 + * 'createSymlink' => [
  25 + * // list of symlinks to be created. Keys are symlinks, and values are the targets.
  26 + * ],
  27 + * ],
  28 + * ];
  29 + * ```
  30 + */
  31 +return [
  32 + 'Development' => [
  33 + 'path' => 'dev',
  34 + 'setWritable' => [
  35 + 'backend/runtime',
  36 + 'backend/web/assets',
  37 + 'frontend/runtime',
  38 + 'frontend/web/assets',
  39 + ],
  40 + 'setExecutable' => [
  41 + 'yii',
  42 + 'tests/codeception/bin/yii',
  43 + ],
  44 + 'setCookieValidationKey' => [
  45 + 'backend/config/main-local.php',
  46 + 'frontend/config/main-local.php',
  47 + ],
  48 + ],
  49 + 'Production' => [
  50 + 'path' => 'prod',
  51 + 'setWritable' => [
  52 + 'backend/runtime',
  53 + 'backend/web/assets',
  54 + 'frontend/runtime',
  55 + 'frontend/web/assets',
  56 + ],
  57 + 'setExecutable' => [
  58 + 'yii',
  59 + ],
  60 + 'setCookieValidationKey' => [
  61 + 'backend/config/main-local.php',
  62 + 'frontend/config/main-local.php',
  63 + ],
  64 + ],
  65 +];
... ...
environments/prod/backend/config/main-local.php 0 → 100755
  1 +++ a/environments/prod/backend/config/main-local.php
  1 +<?php
  2 +return [
  3 + 'components' => [
  4 + 'request' => [
  5 + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  6 + 'cookieValidationKey' => '',
  7 + ],
  8 + ],
  9 +];
... ...
environments/prod/backend/config/params-local.php 0 → 100755
  1 +++ a/environments/prod/backend/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/prod/backend/web/index.php 0 → 100755
  1 +++ a/environments/prod/backend/web/index.php
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', false);
  3 +defined('YII_ENV') or define('YII_ENV', 'prod');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
... ...
environments/prod/common/config/main-local.php 0 → 100755
  1 +++ a/environments/prod/common/config/main-local.php
  1 +<?php
  2 +return [
  3 + 'components' => [
  4 + 'db' => [
  5 + 'class' => 'yii\db\Connection',
  6 + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
  7 + 'username' => 'root',
  8 + 'password' => '',
  9 + 'charset' => 'utf8',
  10 + ],
  11 + 'mailer' => [
  12 + 'class' => 'yii\swiftmailer\Mailer',
  13 + 'viewPath' => '@common/mail',
  14 + ],
  15 + ],
  16 +];
... ...
environments/prod/common/config/params-local.php 0 → 100755
  1 +++ a/environments/prod/common/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/prod/console/config/main-local.php 0 → 100755
  1 +++ a/environments/prod/console/config/main-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/prod/console/config/params-local.php 0 → 100755
  1 +++ a/environments/prod/console/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/prod/frontend/config/main-local.php 0 → 100755
  1 +++ a/environments/prod/frontend/config/main-local.php
  1 +<?php
  2 +return [
  3 + 'components' => [
  4 + 'request' => [
  5 + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  6 + 'cookieValidationKey' => '',
  7 + ],
  8 + ],
  9 +];
... ...
environments/prod/frontend/config/params-local.php 0 → 100755
  1 +++ a/environments/prod/frontend/config/params-local.php
  1 +<?php
  2 +return [
  3 +];
... ...
environments/prod/frontend/web/index.php 0 → 100755
  1 +++ a/environments/prod/frontend/web/index.php
  1 +<?php
  2 +defined('YII_DEBUG') or define('YII_DEBUG', false);
  3 +defined('YII_ENV') or define('YII_ENV', 'prod');
  4 +
  5 +require(__DIR__ . '/../../vendor/autoload.php');
  6 +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  7 +require(__DIR__ . '/../../common/config/bootstrap.php');
  8 +require(__DIR__ . '/../config/bootstrap.php');
  9 +
  10 +$config = yii\helpers\ArrayHelper::merge(
  11 + require(__DIR__ . '/../../common/config/main.php'),
  12 + require(__DIR__ . '/../../common/config/main-local.php'),
  13 + require(__DIR__ . '/../config/main.php'),
  14 + require(__DIR__ . '/../config/main-local.php')
  15 +);
  16 +
  17 +$application = new yii\web\Application($config);
  18 +$application->run();
... ...
environments/prod/tests/codeception/config/config-local.php 0 → 100755
  1 +++ a/environments/prod/tests/codeception/config/config-local.php
  1 +<?php
  2 +return [
  3 + 'components' => [
  4 + 'db' => [
  5 + 'dsn' => 'mysql:host=localhost;dbname=yii2_advanced_tests',
  6 + 'username' => 'root',
  7 + 'password' => '',
  8 + 'charset' => 'utf8',
  9 + ],
  10 + ],
  11 +];
... ...
environments/prod/yii 0 → 100755
  1 +++ a/environments/prod/yii
  1 +#!/usr/bin/env php
  2 +<?php
  3 +/**
  4 + * Yii console bootstrap file.
  5 + *
  6 + * @link http://www.yiiframework.com/
  7 + * @copyright Copyright (c) 2008 Yii Software LLC
  8 + * @license http://www.yiiframework.com/license/
  9 + */
  10 +
  11 +defined('YII_DEBUG') or define('YII_DEBUG', false);
  12 +defined('YII_ENV') or define('YII_ENV', 'prod');
  13 +
  14 +require(__DIR__ . '/vendor/autoload.php');
  15 +require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
  16 +require(__DIR__ . '/common/config/bootstrap.php');
  17 +require(__DIR__ . '/console/config/bootstrap.php');
  18 +
  19 +$config = yii\helpers\ArrayHelper::merge(
  20 + require(__DIR__ . '/common/config/main.php'),
  21 + require(__DIR__ . '/common/config/main-local.php'),
  22 + require(__DIR__ . '/console/config/main.php'),
  23 + require(__DIR__ . '/console/config/main-local.php')
  24 +);
  25 +
  26 +$application = new yii\console\Application($config);
  27 +$exitCode = $application->run();
  28 +exit($exitCode);
... ...
frontend/assets/AppAsset.php 0 → 100755
  1 +++ a/frontend/assets/AppAsset.php
  1 +<?php
  2 +
  3 +namespace frontend\assets;
  4 +
  5 +use yii\web\AssetBundle;
  6 +
  7 +/**
  8 + * Main frontend application asset bundle.
  9 + */
  10 +class AppAsset extends AssetBundle
  11 +{
  12 + public $basePath = '@webroot';
  13 + public $baseUrl = '@web';
  14 + public $css = [
  15 + 'css/site.css',
  16 + ];
  17 + public $js = [
  18 + ];
  19 + public $depends = [
  20 + 'yii\web\YiiAsset',
  21 + 'yii\bootstrap\BootstrapAsset',
  22 + ];
  23 +}
... ...
frontend/assets/MapAsset.php 0 → 100755
  1 +++ a/frontend/assets/MapAsset.php
  1 +<?php
  2 +
  3 +namespace frontend\assets;
  4 +
  5 +use yii\web\AssetBundle;
  6 +
  7 +/**
  8 + * Main frontend application asset bundle.
  9 + */
  10 +class MapAsset extends AssetBundle
  11 +{
  12 + public $basePath = '@webroot';
  13 + public $baseUrl = '@web';
  14 + public $css = [
  15 + ];
  16 + public $js = [
  17 + '/js/handlers.js',
  18 + '/js/map.js',
  19 + 'https://maps.googleapis.com/maps/api/js?signed_in=true&callback=initMap',
  20 + ];
  21 + public $depends = [
  22 + 'yii\web\JqueryAsset'
  23 + ];
  24 +}
... ...
frontend/assets/StatementAsset.php 0 → 100755
  1 +++ a/frontend/assets/StatementAsset.php
  1 +<?php
  2 +
  3 +namespace frontend\assets;
  4 +
  5 +use yii\web\AssetBundle;
  6 +
  7 +/**
  8 + * Main frontend application asset bundle.
  9 + */
  10 +class StatementAsset extends AssetBundle
  11 +{
  12 + public $basePath = '@webroot';
  13 + public $baseUrl = '@web';
  14 + public $css = [
  15 + ];
  16 + public $js = [
  17 + '/js/map.js',
  18 + '/js/statement.js',
  19 + 'https://maps.googleapis.com/maps/api/js?signed_in=true&callback=initMap',
  20 + ];
  21 + public $depends = [
  22 + 'yii\web\JqueryAsset'
  23 + ];
  24 +}
... ...
frontend/config/.gitignore 0 → 100755
  1 +++ a/frontend/config/.gitignore
  1 +main-local.php
  2 +params-local.php
0 3 \ No newline at end of file
... ...
frontend/config/bootstrap.php 0 → 100755
  1 +++ a/frontend/config/bootstrap.php
  1 +<?php
... ...
frontend/config/main.php 0 → 100755
  1 +++ a/frontend/config/main.php
  1 +<?php
  2 +$params = array_merge(
  3 + require(__DIR__ . '/../../common/config/params.php'),
  4 + require(__DIR__ . '/../../common/config/params-local.php'),
  5 + require(__DIR__ . '/params.php'),
  6 + require(__DIR__ . '/params-local.php')
  7 +);
  8 +
  9 +return [
  10 + 'id' => 'app-frontend',
  11 + 'basePath' => dirname(__DIR__),
  12 + 'bootstrap' => ['log'],
  13 + 'controllerNamespace' => 'frontend\controllers',
  14 + 'components' => [
  15 + 'user' => [
  16 + 'identityClass' => 'common\models\User',
  17 + 'enableAutoLogin' => true,
  18 + ],
  19 + 'log' => [
  20 + 'traceLevel' => YII_DEBUG ? 3 : 0,
  21 + 'targets' => [
  22 + [
  23 + 'class' => 'yii\log\FileTarget',
  24 + 'levels' => ['error', 'warning'],
  25 + ],
  26 + ],
  27 + ],
  28 + 'errorHandler' => [
  29 + 'errorAction' => 'site/error',
  30 + ],
  31 + 'urlManager' => [
  32 + 'enablePrettyUrl' => true,
  33 + 'showScriptName' => false,
  34 + 'rules' => [
  35 + ],
  36 + ],
  37 + ],
  38 + 'params' => $params,
  39 +];
... ...
frontend/config/params.php 0 → 100755
  1 +++ a/frontend/config/params.php
  1 +<?php
  2 +return [
  3 + 'adminEmail' => 'admin@example.com',
  4 +];
... ...
frontend/controllers/FlowIntensityController.php 0 → 100644
  1 +++ a/frontend/controllers/FlowIntensityController.php
  1 +<?php
  2 +
  3 + namespace frontend\controllers;
  4 +
  5 + use common\models\Region;
  6 + use common\models\Road;
  7 + use common\models\RoadDirection;
  8 + use common\models\Settlement;
  9 + use Yii;
  10 + use common\models\FlowIntensity;
  11 + use common\models\FlowIntensitySearch;
  12 + use yii\web\Controller;
  13 + use yii\web\NotFoundHttpException;
  14 + use yii\filters\VerbFilter;
  15 +
  16 + /**
  17 + * FlowIntensityController implements the CRUD actions for FlowIntensity model.
  18 + */
  19 + class FlowIntensityController extends Controller
  20 + {
  21 +
  22 + /**
  23 + * @inheritdoc
  24 + */
  25 + public function behaviors()
  26 + {
  27 + return [
  28 + 'verbs' => [
  29 + 'class' => VerbFilter::className(),
  30 + 'actions' => [
  31 + 'delete' => [ 'POST' ],
  32 + ],
  33 + ],
  34 + ];
  35 + }
  36 +
  37 + /**
  38 + * Lists all FlowIntensity models.
  39 + * @return mixed
  40 + */
  41 + public function actionIndex()
  42 + {
  43 + $searchModel = new FlowIntensitySearch();
  44 + $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
  45 +
  46 + return $this->render('index', [
  47 + 'searchModel' => $searchModel,
  48 + 'dataProvider' => $dataProvider,
  49 + ]);
  50 + }
  51 +
  52 + /**
  53 + * Displays a single FlowIntensity model.
  54 + *
  55 + * @param integer $id
  56 + *
  57 + * @return mixed
  58 + */
  59 + public function actionView($id)
  60 + {
  61 + return $this->render('view', [
  62 + 'model' => $this->findModel($id),
  63 + ]);
  64 + }
  65 +
  66 + /**
  67 + * Creates a new FlowIntensity model.
  68 + * If creation is successful, the browser will be redirected to the 'view' page.
  69 + * @return mixed
  70 + */
  71 + public function actionCreate()
  72 + {
  73 + $model = new FlowIntensity();
  74 +
  75 + $roads = Road::find()
  76 + ->select([
  77 + 'name',
  78 + 'road_id',
  79 + ])
  80 + ->asArray()
  81 + ->indexBy('road_id')
  82 + ->column();
  83 + $regions = Region::find()
  84 + ->select([
  85 + 'name',
  86 + 'region_id',
  87 + ])
  88 + ->asArray()
  89 + ->indexBy('region_id')
  90 + ->column();
  91 + $road_directions = RoadDirection::find()
  92 + ->select([
  93 + 'direction_name',
  94 + 'road_direction_id',
  95 + ])
  96 + ->asArray()
  97 + ->indexBy('road_direction_id')
  98 + ->column();
  99 + $settlements = Settlement::find()
  100 + ->select([
  101 + 'name',
  102 + 'settlement_id',
  103 + ])
  104 + ->asArray()
  105 + ->indexBy('settlement_id')
  106 + ->column();
  107 +
  108 + if($model->load(Yii::$app->request->post()) && $model->save()) {
  109 + return $this->redirect([
  110 + 'view',
  111 + 'id' => $model->flow_intensity_id,
  112 + ]);
  113 + } else {
  114 + return $this->render('create', [
  115 + 'model' => $model,
  116 + 'roads' => $roads,
  117 + 'regions' => $regions,
  118 + 'road_directions' => $road_directions,
  119 + 'settlements' => $settlements,
  120 + ]);
  121 + }
  122 + }
  123 +
  124 + /**
  125 + * Updates an existing FlowIntensity model.
  126 + * If update is successful, the browser will be redirected to the 'view' page.
  127 + *
  128 + * @param integer $id
  129 + *
  130 + * @return mixed
  131 + */
  132 + public function actionUpdate($id)
  133 + {
  134 + $model = $this->findModel($id);
  135 +
  136 + $roads = Road::find()
  137 + ->select([
  138 + 'name',
  139 + 'road_id',
  140 + ])
  141 + ->asArray()
  142 + ->indexBy('road_id')
  143 + ->column();
  144 + $regions = Region::find()
  145 + ->select([
  146 + 'name',
  147 + 'region_id',
  148 + ])
  149 + ->asArray()
  150 + ->indexBy('region_id')
  151 + ->column();
  152 + $road_directions = RoadDirection::find()
  153 + ->select([
  154 + 'direction_name',
  155 + 'road_direction_id',
  156 + ])
  157 + ->asArray()
  158 + ->indexBy('road_direction_id')
  159 + ->column();
  160 + $settlements = Settlement::find()
  161 + ->select([
  162 + 'name',
  163 + 'settlement_id',
  164 + ])
  165 + ->asArray()
  166 + ->indexBy('settlement_id')
  167 + ->column();
  168 +
  169 + if($model->load(Yii::$app->request->post()) && $model->save()) {
  170 + return $this->redirect([
  171 + 'view',
  172 + 'id' => $model->flow_intensity_id,
  173 + ]);
  174 + } else {
  175 + return $this->render('update', [
  176 + 'model' => $model,
  177 + 'roads' => $roads,
  178 + 'regions' => $regions,
  179 + 'road_directions' => $road_directions,
  180 + 'settlements' => $settlements,
  181 + ]);
  182 + }
  183 + }
  184 +
  185 + /**
  186 + * Deletes an existing FlowIntensity model.
  187 + * If deletion is successful, the browser will be redirected to the 'index' page.
  188 + *
  189 + * @param integer $id
  190 + *
  191 + * @return mixed
  192 + */
  193 + public function actionDelete($id)
  194 + {
  195 + $this->findModel($id)
  196 + ->delete();
  197 +
  198 + return $this->redirect([ 'index' ]);
  199 + }
  200 +
  201 + /**
  202 + * Finds the FlowIntensity model based on its primary key value.
  203 + * If the model is not found, a 404 HTTP exception will be thrown.
  204 + *
  205 + * @param integer $id
  206 + *
  207 + * @return FlowIntensity the loaded model
  208 + * @throws NotFoundHttpException if the model cannot be found
  209 + */
  210 + protected function findModel($id)
  211 + {
  212 + if(( $model = FlowIntensity::findOne($id) ) !== NULL) {
  213 + return $model;
  214 + } else {
  215 + throw new NotFoundHttpException('The requested page does not exist.');
  216 + }
  217 + }
  218 + }
... ...
frontend/controllers/MapController.php 0 → 100755
  1 +++ a/frontend/controllers/MapController.php
  1 +<?php
  2 + namespace frontend\controllers;
  3 +
  4 + use common\models\RoadPassport;
  5 + use yii\web\Controller;
  6 +
  7 + class MapController extends Controller
  8 + {
  9 + /**
  10 + * @inheritdoc
  11 + */
  12 + public function actions()
  13 + {
  14 + return [
  15 + 'error' => [
  16 + 'class' => 'yii\web\ErrorAction',
  17 + ],
  18 + ];
  19 + }
  20 +
  21 + /**
  22 + * @return mixed
  23 + */
  24 + public function actionIndex()
  25 + {
  26 + $passports = RoadPassport::find()->with('road')->with('road.roadType')->all();
  27 + return $this->render('index', ['passports' => $passports]);
  28 + }
  29 +
  30 + }
... ...
frontend/controllers/PointController.php 0 → 100755
  1 +++ a/frontend/controllers/PointController.php
  1 +<?php
  2 + namespace frontend\controllers;
  3 +
  4 + use common\models\GoogleRoad;
  5 + use common\models\Point;
  6 + use common\models\RoadPassport;
  7 + use yii\data\ActiveDataProvider;
  8 + use yii\data\ArrayDataProvider;
  9 + use yii\web\Controller;
  10 +
  11 + class PointController extends Controller
  12 + {
  13 +
  14 + /**
  15 + * @inheritdoc
  16 + */
  17 + public function actions()
  18 + {
  19 + return [
  20 + 'error' => [
  21 + 'class' => 'yii\web\ErrorAction',
  22 + ],
  23 + ];
  24 + }
  25 +
  26 + /**
  27 + * @return mixed
  28 + */
  29 + public function actionGet($id)
  30 + {
  31 + $request = \Yii::$app->request;
  32 + $response = \Yii::$app->response;
  33 + $response->format = $response::FORMAT_JSON;
  34 + $id = (int) $id;
  35 + $road_passport = RoadPassport::findOne($id);
  36 + if(empty( $road_passport )) {
  37 + $response->setStatusCode(404);
  38 + return $response->statusText;
  39 + }
  40 + $query = Point::find()
  41 + ->where([ 'road_passport_id' => (int) $id ])
  42 + ->orderBy('num')
  43 + ->indexBy('num');
  44 + $dataProvider = new ActiveDataProvider([
  45 + 'query' => $query,
  46 + 'key' => 'num',
  47 + 'pagination' => [
  48 + 'pageSize' => false,
  49 + ],
  50 + ]);
  51 + return [
  52 + 'result' => [
  53 + 'html' => $this->renderAjax('list', [
  54 + 'dataProvider' => $dataProvider,
  55 + 'passport_id' => $id,
  56 + 'road_passport' => $road_passport,
  57 + ]),
  58 + 'points' => $dataProvider->getModels(),
  59 + 'passport' => $road_passport,
  60 + ],
  61 + ];
  62 + }
  63 +
  64 + public function actionAdd($road_passport_id, $lat, $lng, $num, $km)
  65 + {
  66 + $request = \Yii::$app->request;
  67 + $response = \Yii::$app->response;
  68 + $response->format = $response::FORMAT_JSON;
  69 + $get = $request->get();
  70 + $road_passport = RoadPassport::findOne($road_passport_id);
  71 + if(empty( $road_passport )) {
  72 + $response->setStatusCode(404);
  73 + return $response->statusText;
  74 + }
  75 + $point = new Point([
  76 + 'road_passport_id' => $road_passport_id,
  77 + 'lat' => $lat,
  78 + 'lng' => $lng,
  79 + 'num' => $num,
  80 + 'km' => $km,
  81 + ]);
  82 + return [
  83 + 'result' => [
  84 + 'html' => $this->renderAjax('row', [
  85 + 'point' => $point,
  86 + 'passport_id' => $road_passport_id,
  87 + ]),
  88 + ],
  89 + ];
  90 + }
  91 +
  92 + public function actionSave()
  93 + {
  94 + $request = \Yii::$app->request;
  95 + $response = \Yii::$app->response;
  96 + $response->format = $response::FORMAT_JSON;
  97 + $post = $request->post();
  98 + if(!empty( $post )) {
  99 + if(!empty( $post[ 'RoadPassport' ][ 'road_passport_id' ] )) {
  100 + $road_passport = RoadPassport::findOne($post[ 'RoadPassport' ][ 'road_passport_id' ]);
  101 + if(empty( $road_passport )) {
  102 + $response->setStatusCode(404);
  103 + return $response->statusText;
  104 + } else {
  105 + $points = [ ];
  106 + for($i = 1; $i <= count($post[ 'Point' ]); $i++) {
  107 + $points[ $i ] = new Point([ 'road_passport_id' => $road_passport->road_passport_id ]);
  108 + }
  109 + if(Point::loadMultiple($points, $post) && Point::validateMultiple($points)) {
  110 + Point::deleteAll([ 'road_passport_id' => $road_passport->road_passport_id ]);
  111 + foreach($points as $point) {
  112 + $point->save(false);
  113 + }
  114 + return [
  115 + 'result' => [
  116 + 'message' => 'Дані успішно збережені',
  117 + ],
  118 + ];
  119 + } else {
  120 + $response->setStatusCode(400);
  121 + return 'Помилка даних, дані не збережено.';
  122 + }
  123 + }
  124 + }
  125 + }
  126 + $response->setStatusCode(404);
  127 + return $response->statusText;
  128 + }
  129 +
  130 + public function actionSnap(string $path, int $road_passport_id = 2)
  131 + {
  132 + $request = \Yii::$app->request;
  133 + $response = \Yii::$app->response;
  134 + $response->format = $response::FORMAT_JSON;
  135 + $road_passport = RoadPassport::findOne($road_passport_id);
  136 + if(empty( $road_passport )) {
  137 + $response->setStatusCode(404);
  138 + return $response->statusText;
  139 + }
  140 + $google_road = new GoogleRoad($path);
  141 + $result = json_decode($google_road->execute());
  142 + $points = [ ];
  143 + if($result->snappedPoints) {
  144 + foreach($result->snappedPoints as $index => $value) {
  145 + $points[ $index + 1 ] = new Point([
  146 + 'road_passport_id' => $road_passport_id,
  147 + 'lat' => $value->location->latitude,
  148 + 'lng' => $value->location->longitude,
  149 + 'num' => ( $index + 1 ),
  150 + 'km' => $index ? NULL : $road_passport->begin,
  151 + ]);
  152 + }
  153 + }
  154 + $dataProvider = new ArrayDataProvider([
  155 + 'allModels' => $points,
  156 + 'key' => 'num',
  157 + 'pagination' => false,
  158 + ]);
  159 + return [
  160 + 'result' => [
  161 + 'html' => $this->renderAjax('list', [
  162 + 'dataProvider' => $dataProvider,
  163 + 'passport_id' => $road_passport_id,
  164 + 'road_passport' => $road_passport,
  165 + ]),
  166 + 'points' => $dataProvider->getModels(),
  167 + 'passport' => $road_passport,
  168 + ],
  169 + ];
  170 + }
  171 +
  172 + }
... ...