1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests_old/models/RateN.php

17 lines
948 B
PHP
Raw Normal View History

<?php
class RateN extends Doctrine_Entity{
public static function initMetadata($class) {
$class->setTableName('rates');
$class->setColumn('id', 'integer', 4, array('notnull' => true, 'primary' => true, 'autoincrement' => true));
$class->setColumn('policy_code', 'integer', 4, array ( 'notnull' => true, 'notblank' => true,));
$class->setColumn('coverage_code', 'integer', 4, array ( 'notnull' => true, 'notblank' => true,));
$class->setColumn('liability_code', 'integer', 4, array ( 'notnull' => true, 'notblank' => true,));
$class->setColumn('total_rate', 'float', null, array ( 'notnull' => true, 'notblank' => true,));
$class->hasOne('PolicyCodeN', array('local' => 'policy_code', 'foreign' => 'code' ));
$class->hasOne('CoverageCodeN', array('local' => 'coverage_code', 'foreign' => 'code' ));
$class->hasOne('LiabilityCodeN', array('local' => 'liability_code', 'foreign' => 'code' ));
}
}