2024-12-02 21:36:03 +00:00

42 lines
1.4 KiB
PHP

<?php
namespace Ulmus\Attribute\Property\Relation;
use Ulmus\Attribute\Property\Relation;
#[\Attribute(\Attribute::TARGET_PROPERTY)]
class ManyToMany extends Relation
{
public function __construct(
public \Stringable|string|array $key = "",
public null|\Closure|array $generateKey = null,
public null|\Stringable|string|array $foreignKey = null,
public null|\Stringable|string|array $foreignField = null,
public array $foreignKeys = [],
public null|string $bridge = null,
public null|\Stringable|string|array $bridgeKey = null,
public null|\Stringable|string|array $bridgeField = null,
public null|\Stringable|string|array $bridgeForeignKey = null,
public null|\Stringable|string|array $field = null,
public null|string $entity = null,
public null|string $join = null,
public null|string $function = null,
) {
parent::__construct(
RelationTypeEnum::manyToMany,
$this->key,
$this->generateKey,
$this->foreignKey,
$this->foreignField,
$this->foreignKeys,
$this->bridge,
$this->bridgeKey,
$this->bridgeField,
$this->bridgeForeignKey,
$this->field,
$this->entity,
$this->join,
$this->function,
);
}
}