Commit a9f0427e2edb98ac62d97be15a03b87086084cb0

Authored by Yarik
1 parent d2cf06c7

Play count

console/migrations/m161228_121804_play_count_type.php 0 → 100644
  1 +<?php
  2 +
  3 +use yii\db\Migration;
  4 +
  5 +class m161228_121804_play_count_type extends Migration
  6 +{
  7 + public function up()
  8 + {
  9 + $this->alterColumn('intellectual_property', 'play_count', 'integer USING (play_count::integer)');
  10 + }
  11 +
  12 + public function down()
  13 + {
  14 +
  15 + }
  16 +}
... ...
frontend/models/IntellectualProperty.php
... ... @@ -39,6 +39,7 @@
39 39 [
40 40 [
41 41 'user_id',
  42 + 'play_count',
42 43 ],
43 44 'integer',
44 45 ],
... ... @@ -59,7 +60,6 @@
59 60 'contract',
60 61 'type',
61 62 'author_role',
62   - 'play_count',
63 63 ],
64 64 'string',
65 65 'max' => 255,
... ...
frontend/views/cabinet/sales.php
... ... @@ -97,6 +97,20 @@
97 97 <?php
98 98 echo $form->field(
99 99 $property,
  100 + 'percent',
  101 + [
  102 + 'options' => [
  103 + 'class' => 'input-wrapp-320',
  104 + ],
  105 + ]
  106 + )
  107 + ->textInput();
  108 + ?>
  109 + </div>
  110 + <div class="style">
  111 + <?php
  112 + echo $form->field(
  113 + $property,
100 114 'registration_date',
101 115 [
102 116 'options' => [
... ...