c4ys/doctrine-snowflakes-bundle

This Bundle provides an Snowflake-ID Generator for Doctrine

1.0.3 2021-01-28 07:32 UTC

This package is auto-updated.

Last update: 2022-09-14 02:01:31 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;