50], [['name'], 'string', 'max' => 100], [['brand_id'], 'exist', 'skipOnError' => true, 'targetClass' => BrandT::className(), 'targetAttribute' => ['brand_id' => 'id']], [['displacement_id'], 'exist', 'skipOnError' => true, 'targetClass' => DisplacementT::className(), 'targetAttribute' => ['displacement_id' => 'id']], [['series_id'], 'exist', 'skipOnError' => true, 'targetClass' => SeriesT::className(), 'targetAttribute' => ['series_id' => 'id']], [['year_id'], 'exist', 'skipOnError' => true, 'targetClass' => YearT::className(), 'targetAttribute' => ['year_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'op_man' => 'Op Man', 'op_time' => 'Op Time', 'type' => 'Type', 'brand_id' => 'Brand ID', 'series_id' => 'Series ID', 'displacement_id' => 'Displacement ID', 'year_id' => 'Year ID', 'get_man' => 'Get Man', 'number' => 'Number', 'name' => 'Name', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * @return \yii\db\ActiveQuery */ public function getBrand() { return $this->hasOne(BrandT::className(), ['id' => 'brand_id']); } /** * @return \yii\db\ActiveQuery */ public function getDisplacement() { return $this->hasOne(DisplacementT::className(), ['id' => 'displacement_id']); } /** * @return \yii\db\ActiveQuery */ public function getSeries() { return $this->hasOne(SeriesT::className(), ['id' => 'series_id']); } /** * @return \yii\db\ActiveQuery */ public function getYear() { return $this->hasOne(YearT::className(), ['id' => 'year_id']); } }