Blame view

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