uawdijnntqw1x1x1
IP : 216.73.216.28
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
craftcms
/
commerce
/
src
/
.
/
records
/
Variant.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\commerce\records; use craft\commerce\db\Table; use craft\db\ActiveRecord; use craft\records\Element; use yii\db\ActiveQueryInterface; /** * Variant record. * * @property ActiveQueryInterface $element * @property float $height * @property int $id * @property bool $isDefault * @property float $length * @property int $maxQty * @property int $minQty * @property float $price * @property Product $product * @property int $productId * @property string $sku * @property int $sortOrder * @property int $stock * @property bool $hasUnlimitedStock * @property float $weight * @property float $width * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 2.0 */ class Variant extends ActiveRecord { /** * @inheritdoc */ public static function tableName(): string { return Table::VARIANTS; } /** * @inheritdoc */ public function rules(): array { return [ [['sku'], 'unique'], ]; } public function getProduct(): ActiveQueryInterface { return $this->hasOne(Product::class, ['id', 'productId']); } public function getElement(): ActiveQueryInterface { return $this->hasOne(Element::class, ['id', 'id']); } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/craftcms/commerce/src/./records/Variant.php