Blame view

backend/models/Margins.php 806 Bytes
db543d22   Mihail   temp commit - wor...
1
2
  <?php
  
664ccf8e   Administrator   after marge
3
  namespace backend\models;
db543d22   Mihail   temp commit - wor...
4
5
6
7
  
  use Yii;
  
  /**
664ccf8e   Administrator   after marge
8
   * This is the model class for table "w_margins".
db543d22   Mihail   temp commit - wor...
9
10
11
   *
   * @property integer $id
   * @property string $name
664ccf8e   Administrator   after marge
12
   * @property double $koef
db543d22   Mihail   temp commit - wor...
13
   */
664ccf8e   Administrator   after marge
14
  class Margins extends \yii\db\ActiveRecord
db543d22   Mihail   temp commit - wor...
15
16
17
18
19
20
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
664ccf8e   Administrator   after marge
21
          return 'w_margins';
db543d22   Mihail   temp commit - wor...
22
23
24
25
26
27
28
29
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
664ccf8e   Administrator   after marge
30
31
32
33
              [['name', 'koef'], 'required'],
              [['koef'], 'number'],
              [['name'], 'string', 'max' => 100],
              [['name'], 'unique']
db543d22   Mihail   temp commit - wor...
34
35
36
37
38
39
40
41
42
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
664ccf8e   Administrator   after marge
43
44
45
              'id' => 'ID',
              'name' => 'Name',
              'koef' => 'Koef',
db543d22   Mihail   temp commit - wor...
46
47
48
          ];
      }
  }