66
77use Cycle \Annotated \Annotation \Column ;
88use Cycle \Annotated \Annotation \Entity ;
9- use Cycle \ORM \Entity \Behavior \Identifier \ Ulid ;
10- use Cycle \ ORM \ Entity \ Behavior \ Identifier \Uuid4 ;
11- use Ramsey \Identifier \Ulid as UlidInterface ;
9+ use Cycle \ORM \Entity \Behavior \Identifier ;
10+ use Ramsey \ Identifier \Snowflake ;
11+ use Ramsey \Identifier \Ulid ;
1212use Ramsey \Identifier \Uuid ;
1313
1414/**
1515 * @Entity
16- * @Uuid4
17- * @Uuid4(field="uuidNullable", column="uuid_nullable", nullable=true)
18- * @Ulid(field="ulid")
19- * @Ulid(field="ulidNullable", column="ulid_nullable", nullable=true)
16+ * @Identifier\Uuid4
17+ * @Identifier\Uuid4(field="uuidNullable", column="uuid_nullable", nullable=true)
18+ * @Identifier\Ulid(field="ulid")
19+ * @Identifier\Ulid(field="ulidNullable", column="ulid_nullable", nullable=true)
20+ * @Identifier\SnowflakeGeneric(field="snowflake")
21+ * @Identifier\SnowflakeGeneric(field="snowflakeNullable", column="snowflake_nullable", nullable=true)
2022 */
2123#[Entity]
22- #[Uuid4]
23- #[Uuid4(field: 'uuidNullable ' , column: 'uuid_nullable ' , nullable: true )]
24- #[Ulid(field: 'ulid ' )]
25- #[Uuid4(field: 'ulidNullable ' , column: 'ulid_nullable ' , nullable: true )]
24+ #[Identifier \Uuid4]
25+ #[Identifier \Uuid4(field: 'uuidNullable ' , column: 'uuid_nullable ' , nullable: true )]
26+ #[Identifier \Ulid(field: 'ulid ' )]
27+ #[Identifier \Uuid4(field: 'ulidNullable ' , column: 'ulid_nullable ' , nullable: true )]
28+ #[Identifier \SnowflakeGeneric(field: 'snowflake ' )]
29+ #[Identifier \SnowflakeGeneric(field: 'snowflakeNullable ' , column: 'snowflake_nullable ' , nullable: true )]
2630class MultipleIdentifiers
2731{
2832 /**
@@ -41,11 +45,23 @@ class MultipleIdentifiers
4145 * @Column(type="ulid")
4246 */
4347 #[Column(type: 'ulid ' )]
44- public UlidInterface $ ulid ;
48+ public Ulid $ ulid ;
4549
4650 /**
4751 * @Column(type="ulid", nullable=true)
4852 */
4953 #[Column(type: 'ulid ' )]
50- public ?UlidInterface $ ulidNullable = null ;
54+ public ?Ulid $ ulidNullable = null ;
55+
56+ /**
57+ * @Column(type="snowflake")
58+ */
59+ #[Column(type: 'snowflake ' )]
60+ public Snowflake $ snowflake ;
61+
62+ /**
63+ * @Column(type="snowflake", nullable=true)
64+ */
65+ #[Column(type: 'snowflake ' )]
66+ public ?Snowflake $ snowflakeNullable = null ;
5167}
0 commit comments