Blame view

common/models/AccountsVin.php 1.64 KB
0084d336   Administrator   Importers CRUD
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
  <?php
  
  namespace common\models;
  
  use Yii;
  
  /**
   * This is the model class for table "w_accounts_vin".
   *
   * @property integer $account_id
   * @property integer $id
   * @property string $vin
   * @property string $car_name
   * @property integer $car_mfa_id
   * @property string $car_model
   * @property integer $car_mod_id
   * @property string $timestamp
   *
   * @property AccountsVinDetails[] $accountsVinDetails
   */
  class AccountsVin extends \yii\db\ActiveRecord
  {
      /**
       * @inheritdoc
       */
      public static function tableName()
      {
          return 'w_accounts_vin';
      }
  
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['account_id', 'id', 'vin', 'car_name', 'car_mfa_id', 'car_model', 'car_mod_id'], 'required'],
              [['account_id', 'id', 'car_mfa_id', 'car_mod_id'], 'integer'],
              [['timestamp'], 'safe'],
              [['vin'], 'string', 'max' => 30],
              [['car_name'], 'string', 'max' => 100],
              [['car_model'], 'string', 'max' => 150]
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function attributeLabels()
      {
          return [
              'account_id' => 'Account ID',
              'id' => 'ID',
              'vin' => 'Vin',
              'car_name' => 'Car Name',
              'car_mfa_id' => 'Car Mfa ID',
              'car_model' => 'Car Model',
              'car_mod_id' => 'Car Mod ID',
              'timestamp' => 'Timestamp',
          ];
      }
  
      /**
       * @return \yii\db\ActiveQuery
       */
      public function getAccountsVinDetails()
      {
          return $this->hasMany(AccountsVinDetails::className(), ['account_id' => 'account_id', 'id' => 'id']);
      }
  }