silverstripe-framework/tests/php/ORM/DecimalTest/TestObject.php
Michal Kleiner b107622400
FIX Improve rounding logic for storing of long decimal numbers (#10593)
Co-authored-by: Michal Kleiner <michal.kleiner@cub3.com>
2022-11-29 15:07:56 +13:00

27 lines
696 B
PHP

<?php
namespace SilverStripe\ORM\Tests\DecimalTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
class TestObject extends DataObject implements TestOnly
{
private static $table_name = 'DecimalTest_DataObject';
private static $db = [
'Name' => 'Varchar',
'MyDecimal1' => 'Decimal',
'MyDecimal2' => 'Decimal(5,3,2.5)',
'MyDecimal3' => 'Decimal(4,2,"Invalid default value")',
'MyDecimal4' => 'Decimal',
'MyDecimal5' => 'Decimal(20,18,0.99999999999999999999)',
'MyDecimal6' => 'Decimal',
];
private static $defaults = [
'MyDecimal4' => 4,
'MyDecimal6' => 7.99999999999999999999,
];
}