Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (45 sloc) 1.22 KB
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\commerce\records;
use craft\db\ActiveRecord;
use yii\db\ActiveQueryInterface;
/**
* Product type shipping category record.
*
* @property ProductType $productType
* @property int $productTypeId
* @property ShippingCategory $shippingCategory
* @property int $shippingCategoryId
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @since 2.0
*/
class ProductTypeShippingCategory extends ActiveRecord
{
// Public Methods
// =========================================================================
/**
* @inheritdoc
*/
public static function tableName(): string
{
return '{{%commerce_producttypes_shippingcategories}}';
}
/**
* @return ActiveQueryInterface
*/
public function getProductType(): ActiveQueryInterface
{
return $this->hasOne(ProductType::class, ['id', 'productTypeId']);
}
/**
* @return ActiveQueryInterface
*/
public function getShippingCategory(): ActiveQueryInterface
{
return $this->hasOne(ShippingCategory::class, ['id', 'shippingCategoryId']);
}
}
You can’t perform that action at this time.