https://github.com/cycle/entity-behavior-uuid
UUID behavior
https://github.com/cycle/entity-behavior-uuid
Last synced: about 1 year ago
JSON representation
UUID behavior
- Host: GitHub
- URL: https://github.com/cycle/entity-behavior-uuid
- Owner: cycle
- License: mit
- Created: 2021-12-07T09:33:06.000Z (over 4 years ago)
- Default Branch: 1.x
- Last Pushed: 2024-02-19T18:48:57.000Z (over 2 years ago)
- Last Synced: 2025-03-22T06:41:57.417Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Cycle ORM Entity Behavior UUID
[](https://packagist.org/packages/cycle/entity-behavior-uuid)
[](https://github.com/cycle/entity-behavior-uuid/actions)
[](https://scrutinizer-ci.com/g/cycle/entity-behavior-uuid/?branch=1.x)
[](https://codecov.io/gh/cycle/entity-behavior)

The package provides an ability to use `ramsey/uuid` as a Cycle ORM entity column type.
## Installation
Install this package as a dependency using Composer.
```bash
composer require cycle/entity-behavior-uuid
```
## Example
They are randomly-generated and do not contain any information about the time they are created or the machine that
generated them.
```php
use Cycle\Annotated\Annotation\Column;
use Cycle\Annotated\Annotation\Entity;
use Cycle\ORM\Entity\Behavior\Uuid\Uuid4;
use Ramsey\Uuid\UuidInterface;
#[Entity]
#[Uuid4]
class User
{
#[Column(field: 'uuid', type: 'uuid', primary: true)]
private UuidInterface $uuid;
}
```
You can find more information about Entity behavior UUID [here](https://cycle-orm.dev/docs/entity-behaviors-uuid).
## License:
The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.
Maintained by [Spiral Scout](https://spiralscout.com).