2025-04-15 02:39:35 -07:00
|
|
|
<?php
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace CakeProducts\Model\Entity;
|
|
|
|
|
|
2025-09-10 22:19:27 -07:00
|
|
|
use Cake\I18n\DateTime;
|
2025-04-15 02:39:35 -07:00
|
|
|
use Cake\ORM\Entity;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ProductSkus Entity
|
|
|
|
|
*
|
|
|
|
|
* @property string $id
|
|
|
|
|
* @property string $product_id
|
|
|
|
|
* @property string $sku
|
|
|
|
|
* @property string|null $barcode
|
|
|
|
|
* @property string|null $price
|
|
|
|
|
* @property string|null $cost
|
2025-09-10 22:19:27 -07:00
|
|
|
* @property DateTime $created
|
|
|
|
|
* @property DateTime|null $modified
|
|
|
|
|
* @property DateTime|null $deleted
|
2025-10-06 23:34:27 -07:00
|
|
|
* @property bool $default_sku
|
2025-04-15 02:39:35 -07:00
|
|
|
*
|
2025-09-10 22:19:27 -07:00
|
|
|
* @property Product $product
|
|
|
|
|
* @property ProductSkuVariantValue[] $product_sku_variant_values
|
2025-04-15 02:39:35 -07:00
|
|
|
*/
|
|
|
|
|
class ProductSku extends Entity
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Fields that can be mass assigned using newEntity() or patchEntity().
|
|
|
|
|
*
|
|
|
|
|
* Note that when '*' is set to true, this allows all unspecified fields to
|
|
|
|
|
* be mass assigned. For security purposes, it is advised to set '*' to false
|
|
|
|
|
* (or remove it), and explicitly make individual fields accessible as needed.
|
|
|
|
|
*
|
|
|
|
|
* @var array<string, bool>
|
|
|
|
|
*/
|
|
|
|
|
protected array $_accessible = [
|
|
|
|
|
'product_id' => true,
|
|
|
|
|
'sku' => true,
|
|
|
|
|
'barcode' => true,
|
|
|
|
|
'price' => true,
|
|
|
|
|
'cost' => true,
|
|
|
|
|
'created' => true,
|
|
|
|
|
'modified' => true,
|
|
|
|
|
'deleted' => true,
|
2025-10-06 23:34:27 -07:00
|
|
|
'default_sku' => true,
|
2025-09-10 22:19:27 -07:00
|
|
|
|
|
|
|
|
// entities
|
2025-04-15 02:39:35 -07:00
|
|
|
'product' => false,
|
2025-09-10 22:58:37 -07:00
|
|
|
'product_sku_variant_values' => true,
|
2025-04-15 02:39:35 -07:00
|
|
|
];
|
|
|
|
|
}
|