Files
cake-products/src/Model/Entity/ProductPhoto.php
T

63 lines
1.6 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace CakeProducts\Model\Entity;
use Cake\ORM\Entity;
/**
* ProductPhoto Entity
*
* @property string $id
* @property string|null $product_id
2025-10-12 01:04:36 -07:00
* @property string|null $product_category_id
* @property string|null $product_sku_id
* @property string $photo_dir
* @property string $photo_filename
* @property bool $primary_photo
2025-10-12 01:04:36 -07:00
* @property bool $primary_category_photo
* @property bool $primary_sku_photo
* @property int $photo_position
* @property bool $enabled
* @property \Cake\I18n\DateTime $created
* @property \Cake\I18n\DateTime|null $modified
* @property \Cake\I18n\DateTime|null $deleted
*
2025-10-12 01:04:36 -07:00
* @property Product|null $product
* @property ProductSku|null $product_sku
* @property ProductCategory $product_category
*/
class ProductPhoto 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,
'product_sku_id' => true,
'product_category_id' => true,
'photo_dir' => true,
'photo_filename' => true,
'primary_photo' => true,
'primary_category_photo' => true,
'primary_sku_photo' => true,
'photo_position' => true,
'enabled' => true,
'created' => true,
'modified' => true,
'deleted' => true,
// entities
'product' => false,
'product_sku' => false,
'product_category' => false,
];
}