Function: Decimal()
Decimal(
options?):PropertyDecorator
Defined in: src/decorators/DecimalDecorator.ts:24
Property decorator defining a high-precision decimal database column. Typically maps to SQL DECIMAL(precision, scale) or NUMERIC(precision, scale). Default precision is 18 and scale is 4.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | DecimalOptions | Decimal precision and scale options. |
Returns
PropertyDecorator
Example
@Decimal({ precision: 18, scale: 4 })
balance!: string;