2025-08-10 02:35:25 -07:00
|
|
|
<?php
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace CakeProducts\Model\Entity;
|
|
|
|
|
|
|
|
|
|
use Cake\ORM\Entity;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ProductPhoto Entity
|
|
|
|
|
*
|
|
|
|
|
* @property string $id
|
2025-11-01 23:16:59 -07:00
|
|
|
* @property string|null $product_id
|
2025-10-12 01:04:36 -07:00
|
|
|
* @property string|null $product_category_id
|
2025-08-10 02:35:25 -07:00
|
|
|
* @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
|
2025-11-01 16:10:48 -07:00
|
|
|
* @property bool $primary_sku_photo
|
2025-08-10 02:35:25 -07:00
|
|
|
* @property int $photo_position
|
|
|
|
|
* @property bool $enabled
|
2026-08-21 23:57:55 -07:00
|
|
|
* @property \Cake\I18n\DateTime $created
|
|
|
|
|
* @property \Cake\I18n\DateTime|null $modified
|
|
|
|
|
* @property \Cake\I18n\DateTime|null $deleted
|
2025-08-10 02:35:25 -07:00
|
|
|
*
|
2025-10-12 01:04:36 -07:00
|
|
|
* @property Product|null $product
|
|
|
|
|
* @property ProductSku|null $product_sku
|
|
|
|
|
* @property ProductCategory $product_category
|
2025-08-10 02:35:25 -07:00
|
|
|
*/
|
2026-08-21 23:57:55 -07:00
|
|
|
class ProductPhoto extends Entity {
|
|
|
|
|
|
|
|
|
|
/**
|
2025-08-10 02:35:25 -07:00
|
|
|
* 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>
|
|
|
|
|
*/
|
2026-08-21 23:57:55 -07:00
|
|
|
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,
|
|
|
|
|
];
|
2025-09-10 22:19:27 -07:00
|
|
|
|
2025-08-10 02:35:25 -07:00
|
|
|
}
|