kaigrassnick / doctrine-snowflake-bundle
This Bundle provides an Snowflake-ID Generator for Doctrine
1.0.3
2021-01-28 08:32 UTC
Requires
- php: ^7.4|^8.0
- kaigrassnick/snowflake-bundle: ^1.0
- symfony/framework-bundle: ^5.0
- symfony/orm-pack: ^2.0
This package is auto-updated.
Last update: 2025-02-28 15:54:28 UTC
README
This bundle provides a simple Snowflake ID Generator for Doctrine.
How To Use
Use as custom strategy inside your entity
/**
* @var string
*
* @ORM\Id()
* @ORM\GeneratedValue(strategy="CUSTOM")
* @ORM\Column(type="bigint", unique=true, nullable=false)
* @ORM\CustomIdGenerator(class="KaiGrassnick\DoctrineSnowflakeBundle\Generator\SnowflakeGenerator")
*/
private string $id;