/** * @inheritdoc */ public function rules() { return [[['shop_properties_id'], 'integer'], [['name', 'anchor', 'url'], 'string', 'max' => 255], [['shop_properties_id'], 'exist', 'skipOnError' => true, 'targetClass' => ShopProperties::className(), 'targetAttribute' => ['shop_properties_id' => 'id']]]; }
/** * @return \yii\db\ActiveQuery */ public function getShopProperty() { return $this->hasOne(ShopProperties::className(), ['id' => 'shop_properties_id']); }