Files
cake-products/src/Model/Entity/ProductSku.php

53 lines
1.3 KiB
PHP
Raw Normal View History

2025-04-15 02:39:35 -07:00
<?php
declare(strict_types=1);
namespace CakeProducts\Model\Entity;
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
* @property DateTime $created
* @property DateTime|null $modified
* @property DateTime|null $deleted
* @property bool $default_sku
2025-04-15 02:39:35 -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,
'default_sku' => true,
// 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
];
}