100], [['code'], 'string', 'max' => 50], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'factory_id' => 'Factory ID', 'brand_id' => 'Brand ID', 'code' => 'Code', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public function getBrand() { return $this->hasOne(Brand2T::className(),['id'=>'brand_id']); } public function getFactory() { return $this->hasOne(FactoryT::className(),['id'=>'factory_id']); } }