MT#5879 Source_account_id relation for accounting.cdr.

According to ossbss, it is connection between calls and contracts.
mr3.3.1
Irina Peshinskaya 11 years ago
parent d5932b5644
commit d5983409d7

@ -211,7 +211,7 @@ for my $col (qw/init_time start_time/) {
__PACKAGE__->belongs_to(
"source_customer_billing_zones_history",
"NGCP::Schema::Result::billing_zones_history",
{ "bz_id" => "source_customer_billing_zone_id" },
{ "bz_id" => "source_customer_billing_zone_id" },
{
is_deferrable => 1,
join_type => "LEFT",
@ -219,6 +219,18 @@ __PACKAGE__->belongs_to(
on_update => "NO ACTION",
},
);
__PACKAGE__->belongs_to(
"source_account",
"NGCP::Schema::Result::contracts",
{ "id" => "source_account_id" },
{
is_deferrable => 1,
join_type => "LEFT",
on_delete => "SET NULL",
on_update => "UPDATE",
},
);
sub TO_JSON {
my ($self) = @_;
return {

Loading…
Cancel
Save