Blame view

common/models/UserInfo.php 3.17 KB
1face72c   Yarik   test
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
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "user_info".
   *
   * @property integer $user_id
   * @property integer $view_count
   * @property string $busy
   * @property string $date_visit
   * @property string $experience
   * @property string $rank
   * @property string $salary
   * @property string $job
   * @property string $location
   * @property string $soft
   * @property integer $user_info_id
   * @property string $guarantee
   * @property integer $contract
   * @property integer $estimate
   * @property integer $purchase
   * @property integer $delivery
   * @property double $prepayment
   * @property string $about
51e0a262   Yarik   test
28
   * @property integer $type
1face72c   Yarik   test
29
30
31
   */
  class UserInfo extends \yii\db\ActiveRecord
  {
51e0a262   Yarik   test
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
      // Константа обознащающая физическое лицо
      const USER_TYPE_FIZ = 1;
  
      // Константа обозначающая компанию
      const USER_TYPE_COMPANY = 2;
  
      // Константа обозначающая, что компания/физ.лицо свободно
      const USER_STATUS_FREE = 1;
  
      // Константа обозначающая, что компания/физ.лицо занято
      const USER_STATUS_BUSY = 2;
  
      // Константа обозначающая, что компания/физ.лицо хочет стать членом МФП
      const USER_MEMBER_FALSE = 1;
  
      // Константа обозначающая, что компания/физ.лицо не хочет стать членом МФП
      const USER_MEMBER_TRUE = 2;
  
1face72c   Yarik   test
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'user_info';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['user_id', 'view_count', 'contract', 'estimate', 'purchase', 'delivery'], 'integer'],
              [['date_visit'], 'safe'],
51e0a262   Yarik   test
66
              [['experience', 'soft', 'guarantee', 'about', 'city', 'country'], 'string'],
1face72c   Yarik   test
67
              [['prepayment'], 'number'],
51e0a262   Yarik   test
68
69
70
              [['rank', 'location'], 'string', 'max' => 50],
              [['salary', 'job'], 'string', 'max' => 255],
              [['busy', 'member'], 'boolean'],
1face72c   Yarik   test
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'user_id' => Yii::t('app', 'User ID'),
              'view_count' => Yii::t('app', 'View Count'),
              'busy' => Yii::t('app', 'Busy'),
              'date_visit' => Yii::t('app', 'Date Visit'),
              'experience' => Yii::t('app', 'Experience'),
              'rank' => Yii::t('app', 'Rank'),
              'salary' => Yii::t('app', 'Salary'),
              'job' => Yii::t('app', 'Job'),
              'location' => Yii::t('app', 'Location'),
              'soft' => Yii::t('app', 'Soft'),
              'user_info_id' => Yii::t('app', 'User Info ID'),
              'guarantee' => Yii::t('app', 'Guarantee'),
              'contract' => Yii::t('app', 'Contract'),
              'estimate' => Yii::t('app', 'Estimate'),
              'purchase' => Yii::t('app', 'Purchase'),
              'delivery' => Yii::t('app', 'Delivery'),
              'prepayment' => Yii::t('app', 'Prepayment'),
              'about' => Yii::t('app', 'About'),
          ];
      }
  }