Added Traffic Data matching

This commit is contained in:
Deon George
2013-10-11 15:02:56 +11:00
parent 6e95184b0c
commit 335e8e65bd
3 changed files with 75 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ class Model_ADSL_Supplier extends ORM_OSB {
// Relationships
protected $_has_many = array(
'adsl_supplier_plan'=>array('model'=>'ADSL_Supplier_Plan','foreign_key'=>'supplier_id','far_key'=>'id'),
'traffic'=>array('model'=>'Service_Plugin_Adsl_Traffic','foreign_key'=>'supplier_id','far_key'=>'id'),
);
protected $_form = array('id'=>'id','value'=>'name');

View File

@@ -17,6 +17,10 @@ class Model_Service_Plugin_Adsl_Traffic extends ORM_OSB {
protected $_created_column = FALSE;
protected $_updated_column = FALSE;
protected $_has_one = array(
'plan'=>array('model'=>'Service_Plugin_Adsl','foreign_key'=>'service_username','far_key'=>'service'),
);
public function rules() {
$result = parent::rules();