Blame view

backend/models/Importers.php 3.37 KB
92bb547f   Mihail   add migration and...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  <?php
  
  namespace backend\models;
  
  use Yii;
  use backend\components\base\BaseActiveRecord;
  
  /**
   * This is the model class for table "{{%importer}}".
   *
   * @property integer $id
   * @property string $code
   * @property string $name
   * @property string $name_price
   * @property string $currency_id
   * @property string $delivery
   * @property string $email
   * @property string $info
   * @property integer $active
   * @property integer $PARSER_IS_ACTIVE
   * @property string $PARSER_COLUMN_COUNT
   * @property string $PARSER_FIELD_BRAND
   * @property string $PARSER_FIELD_ARTICLE
   * @property integer $PARSER_FIELD_ARTICLE_PREFIX
   * @property string $PARSER_FIELD_PRICE
   * @property string $PARSER_FIELD_DESCR
   * @property string $PARSER_FIELD_BOX
   * @property string $PARSER_FIELD_ADD_BOX
   * @property string $PARSER_FIELD_GROUP_RG
   * @property string $PARSER_FIELD_SIGN
   * @property double $PARSER_FIELD_MULTIPLIER
   * @property string $price_date_update
   */
942bad48   Mihail   adapt project to ...
34
  class Importers extends BaseActiveRecord
92bb547f   Mihail   add migration and...
35
  {
92bb547f   Mihail   add migration and...
36
  
92bb547f   Mihail   add migration and...
37
38
39
      public function rules()
      {
          return [
2fb5a757   Mihail   add menu and chec...
40
41
              [['code', 'name', 'currency_id', 'delivery', 'price_date_update'], 'required'],
              [['name_price', 'email', 'PARSER_FIELD_SIGN', 'info'], 'safe'],
92bb547f   Mihail   add migration and...
42
43
44
45
46
              [['currency_id', 'active', 'PARSER_IS_ACTIVE', 'PARSER_COLUMN_COUNT', 'PARSER_FIELD_BRAND', 'PARSER_FIELD_ARTICLE', 'PARSER_FIELD_ARTICLE_PREFIX', 'PARSER_FIELD_PRICE', 'PARSER_FIELD_DESCR', 'PARSER_FIELD_BOX', 'PARSER_FIELD_ADD_BOX', 'PARSER_FIELD_GROUP_RG'], 'integer'],
              [['info'], 'string'],
              [['PARSER_FIELD_MULTIPLIER'], 'number'],
              [['code', 'name', 'name_price', 'delivery', 'email'], 'string', 'max' => 254],
              [['PARSER_FIELD_SIGN'], 'string', 'max' => 1],
3b7211a0   Mihail   change query for ...
47
           //   [['price_date_update'], 'string', 'max' => 15],
92bb547f   Mihail   add migration and...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
              [['code'], 'unique'],
              [['name'], 'unique']
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'id' => Yii::t('app', 'ID'),
              'code' => Yii::t('app', 'Code'),
              'name' => Yii::t('app', 'Name'),
              'name_price' => Yii::t('app', 'Name Price'),
              'currency_id' => Yii::t('app', 'Currency ID'),
              'delivery' => Yii::t('app', 'Delivery'),
              'email' => Yii::t('app', 'Email'),
              'info' => Yii::t('app', 'Info'),
              'active' => Yii::t('app', 'Active'),
              'PARSER_IS_ACTIVE' => Yii::t('app', 'Parser  Is  Active'),
              'PARSER_COLUMN_COUNT' => Yii::t('app', 'Parser  Column  Count'),
              'PARSER_FIELD_BRAND' => Yii::t('app', 'Parser  Field  Brand'),
              'PARSER_FIELD_ARTICLE' => Yii::t('app', 'Parser  Field  Article'),
              'PARSER_FIELD_ARTICLE_PREFIX' => Yii::t('app', 'Parser  Field  Article  Prefix'),
              'PARSER_FIELD_PRICE' => Yii::t('app', 'Parser  Field  Price'),
              'PARSER_FIELD_DESCR' => Yii::t('app', 'Parser  Field  Descr'),
              'PARSER_FIELD_BOX' => Yii::t('app', 'Parser  Field  Box'),
              'PARSER_FIELD_ADD_BOX' => Yii::t('app', 'Parser  Field  Add  Box'),
              'PARSER_FIELD_GROUP_RG' => Yii::t('app', 'Parser  Field  Group  Rg'),
              'PARSER_FIELD_SIGN' => Yii::t('app', 'Parser  Field  Sign'),
              'PARSER_FIELD_MULTIPLIER' => Yii::t('app', 'Parser  Field  Multiplier'),
              'price_date_update' => Yii::t('app', 'Price Date Update'),
          ];
      }
165348a4   Mihail   draft commit
83
84
85
  
  
  
92bb547f   Mihail   add migration and...
86
  }