2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
|
|
|
class Policy extends Doctrine_Record
|
|
|
|
{
|
2008-02-04 00:29:57 +03:00
|
|
|
public static function initMetadata($class)
|
2007-09-02 18:24:49 +04:00
|
|
|
{
|
2008-02-04 00:29:57 +03:00
|
|
|
$class->setColumn('policy_number', 'integer', 11, array('unique' => true));
|
|
|
|
$class->hasMany('PolicyAsset as PolicyAssets', array('local' => 'policy_number',
|
2007-09-02 18:24:49 +04:00
|
|
|
'foreign' => 'policy_number'));
|
2008-02-04 00:29:57 +03:00
|
|
|
$class->addIndex('policy_number_index', array('fields' => array('policy_number')));
|
2007-09-02 18:24:49 +04:00
|
|
|
}
|
2008-02-04 00:29:57 +03:00
|
|
|
|
2007-09-02 18:24:49 +04:00
|
|
|
}
|