marekskopal/orm-decimal

Decimal type from ext-decimal PHP extension mapper for MarekSkopal ORM.

dev-main 2024-12-23 21:25 UTC

This package is auto-updated.

Last update: 2024-12-23 21:25:39 UTC


README

Decimal type from ext-decimal PHP extension mapper for MarekSkopal ORM.

Install

composer require marekskopal/orm-decimal

Usage

Add ColumnDecimal attribute to your entity parameter.

use Decimal\Decimal;
use MarekSkopal\ORM\Attribute\Entity;
use MarekSkopal\ORM\Decimal\Attribute\ColumnDecimal;

#[Entity]
class MyEntity
{
    #[ColumnDecimal(precision: 8, scale: 2)]
    public Decimal $value;
}