Blame view

common/models/UserInfo.php 3.55 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
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'user_info';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
30fbd0bc   Administrator   09.02.16
64
              [['user_id', 'view_count', 'contract', 'estimate', 'purchase', 'delivery','is_customer','is_freelancer'], 'integer'],
1face72c   Yarik   test
65
              [['date_visit'], 'safe'],
f6a2a0d5   Yarik   test
66
              [['experience', 'soft', 'guarantee', 'about', 'city', 'country', 'image', 'poster', 'social_vk', 'social_fb', 'social_in', 'social_t'], 'string'],
1face72c   Yarik   test
67
              [['prepayment'], 'number'],
8f939a27   Administrator   add Vitaliy's wid...
68
  
51e0a262   Yarik   test
69
              [['rank', 'location'], 'string', 'max' => 50],
30fbd0bc   Administrator   09.02.16
70
              [['salary', 'job','firstname','lastname'], 'string', 'max' => 255],
51e0a262   Yarik   test
71
              [['busy', 'member'], 'boolean'],
1face72c   Yarik   test
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
          ];
      }
  
      /**
       * @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'),
30fbd0bc   Administrator   09.02.16
99
100
101
102
103
104
              'type' => Yii::t('app', 'Is Default'),
              'firstname' => 'Имя',
              'lastname' => 'Фамилия',
              'alt_location' => 'Город не в списке',
              'is_customer' => '',
              'is_freelancer' => '',
8f939a27   Administrator   add Vitaliy's wid...
105
  
1face72c   Yarik   test
106
107
108
          ];
      }
  }