1
0
mirror of synced 2025-01-18 06:21:40 +03:00
This commit is contained in:
zYne 2007-07-23 23:41:16 +00:00
parent 7d7df95556
commit 9232529117

View File

@ -85,7 +85,7 @@ class Product extends Doctrine_Record
public function setTableDefinition()
{
$this->hasColumn('id', 'integer', 4, 'primary');
$this->hasColumn('price', 'decimal', 18, array('min' => 0);
$this->hasColumn('price', 'decimal', 18, array('min' => 0));
}
}
</code>
@ -110,7 +110,7 @@ class Product extends Doctrine_Record
public function setTableDefinition()
{
$this->hasColumn('id', 'integer', 4, 'primary');
$this->hasColumn('price', 'decimal', 18, array('min' => 0, 'max' => 1000000);
$this->hasColumn('price', 'decimal', 18, array('min' => 0, 'max' => 1000000));
}
}
</code>
@ -134,8 +134,8 @@ class Product extends Doctrine_Record
public function setTableDefinition()
{
$this->hasColumn('id', 'integer', 4, 'primary');
$this->hasColumn('price', 'decimal', 18, array('min' => 0, 'max' => 1000000);
$this->hasColumn('discounted_price', 'decimal', 18, array('min' => 0, 'max' => 1000000);
$this->hasColumn('price', 'decimal', 18, array('min' => 0, 'max' => 1000000));
$this->hasColumn('discounted_price', 'decimal', 18, array('min' => 0, 'max' => 1000000));
$this->check('price > discounted_price');
}