diff --git a/lib/NGCP/Schema.pm b/lib/NGCP/Schema.pm index 2a6436d6..049218d1 100644 --- a/lib/NGCP/Schema.pm +++ b/lib/NGCP/Schema.pm @@ -4,13 +4,21 @@ use aliased 'NGCP::Schema::Exception'; use NGCP::Schema::Config qw(); use Regexp::Common qw(net); use Regexp::IPv6 qw($IPv6_re); +use MooseX::ClassAttribute qw(class_has); +extends 'DBIx::Class::Schema'; our $VERSION = '1.003'; -has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { +__PACKAGE__->load_namespaces; + +class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { return NGCP::Schema::Config->instance; }); +method connection { + $self->SUPER::connection($self->config->as_hash->{database}); +} + method validate($data, $mandatory_params, $optional_params?) { Exception->throw({ description => 'Client.Syntax.MissingParam', @@ -106,6 +114,23 @@ L, L, L. +=head1 INCOMPATIBILITIES + +Version 2 moves the result classes of all tables into one namespace. This means the following table names collide: + + accounting.acc_backup kamailio.acc_backup + accounting.acc_trash kamailio.acc_trash + accounting.acc kamailio.acc + accounting.mark sipstats.mark + billing.contracts carrier.contracts + billing.customers carrier.customers + billing.orders carrier.orders + billing.payments carrier.payments + billing.voip_subscribers provisioning.voip_subscribers + +This is solved by prefixing the result class name I with the database name and an +underscore, e.g. table C becomes the result class . + =head1 BUGS AND LIMITATIONS L diff --git a/lib/NGCP/Schema/accounting/Result/acc.pm b/lib/NGCP/Schema/Result/acc.pm similarity index 96% rename from lib/NGCP/Schema/accounting/Result/acc.pm rename to lib/NGCP/Schema/Result/acc.pm index ba7cb5e7..91593334 100644 --- a/lib/NGCP/Schema/accounting/Result/acc.pm +++ b/lib/NGCP/Schema/Result/acc.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::accounting::Result::acc; +package NGCP::Schema::Result::acc; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("acc"); +__PACKAGE__->table("accounting.acc"); __PACKAGE__->add_columns( @@ -81,7 +81,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::accounting::Result::acc +NGCP::Schema::Result::acc =head1 COMPONENTS LOADED @@ -93,7 +93,7 @@ NGCP::Schema::accounting::Result::acc =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/accounting/Result/acc_backup.pm b/lib/NGCP/Schema/Result/acc_backup.pm similarity index 96% rename from lib/NGCP/Schema/accounting/Result/acc_backup.pm rename to lib/NGCP/Schema/Result/acc_backup.pm index e27cbc4f..2e39b8bf 100644 --- a/lib/NGCP/Schema/accounting/Result/acc_backup.pm +++ b/lib/NGCP/Schema/Result/acc_backup.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::accounting::Result::acc_backup; +package NGCP::Schema::Result::acc_backup; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("acc_backup"); +__PACKAGE__->table("accounting.acc_backup"); __PACKAGE__->add_columns( @@ -81,7 +81,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::accounting::Result::acc_backup +NGCP::Schema::Result::acc_backup =head1 COMPONENTS LOADED @@ -93,7 +93,7 @@ NGCP::Schema::accounting::Result::acc_backup =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/accounting/Result/acc_trash.pm b/lib/NGCP/Schema/Result/acc_trash.pm similarity index 96% rename from lib/NGCP/Schema/accounting/Result/acc_trash.pm rename to lib/NGCP/Schema/Result/acc_trash.pm index eb43aa61..c5d0eb3c 100644 --- a/lib/NGCP/Schema/accounting/Result/acc_trash.pm +++ b/lib/NGCP/Schema/Result/acc_trash.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::accounting::Result::acc_trash; +package NGCP::Schema::Result::acc_trash; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("acc_trash"); +__PACKAGE__->table("accounting.acc_trash"); __PACKAGE__->add_columns( @@ -81,7 +81,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::accounting::Result::acc_trash +NGCP::Schema::Result::acc_trash =head1 COMPONENTS LOADED @@ -93,7 +93,7 @@ NGCP::Schema::accounting::Result::acc_trash =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/active_watchers.pm b/lib/NGCP/Schema/Result/active_watchers.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/active_watchers.pm rename to lib/NGCP/Schema/Result/active_watchers.pm index c50963ac..f45e54a6 100644 --- a/lib/NGCP/Schema/kamailio/Result/active_watchers.pm +++ b/lib/NGCP/Schema/Result/active_watchers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::active_watchers; +package NGCP::Schema::Result::active_watchers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("active_watchers"); +__PACKAGE__->table("kamailio.active_watchers"); __PACKAGE__->add_columns( @@ -96,7 +96,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::active_watchers +NGCP::Schema::Result::active_watchers =head1 COMPONENTS LOADED @@ -108,7 +108,7 @@ NGCP::Schema::kamailio::Result::active_watchers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/address.pm b/lib/NGCP/Schema/Result/address.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/address.pm rename to lib/NGCP/Schema/Result/address.pm index 5fe2a0f3..982a216b 100644 --- a/lib/NGCP/Schema/kamailio/Result/address.pm +++ b/lib/NGCP/Schema/Result/address.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::address; +package NGCP::Schema::Result::address; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("address"); +__PACKAGE__->table("kamailio.address"); __PACKAGE__->add_columns( @@ -60,7 +60,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::address +NGCP::Schema::Result::address =head1 COMPONENTS LOADED @@ -72,7 +72,7 @@ NGCP::Schema::kamailio::Result::address =back -=head1 TABLE: C
+=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/admins.pm b/lib/NGCP/Schema/Result/admins.pm similarity index 93% rename from lib/NGCP/Schema/billing/Result/admins.pm rename to lib/NGCP/Schema/Result/admins.pm index 01e4d42c..45098d77 100644 --- a/lib/NGCP/Schema/billing/Result/admins.pm +++ b/lib/NGCP/Schema/Result/admins.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::admins; +package NGCP::Schema::Result::admins; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON", "EncodedColumn"); -__PACKAGE__->table("admins"); +__PACKAGE__->table("billing.admins"); __PACKAGE__->add_columns( @@ -70,7 +70,7 @@ __PACKAGE__->add_unique_constraint("login_idx", ["login"]); __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -89,7 +89,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::admins +NGCP::Schema::Result::admins =head1 COMPONENTS LOADED @@ -101,7 +101,7 @@ NGCP::Schema::billing::Result::admins =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -197,7 +197,7 @@ NGCP::Schema::billing::Result::admins Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/aliases.pm b/lib/NGCP/Schema/Result/aliases.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/aliases.pm rename to lib/NGCP/Schema/Result/aliases.pm index 9d22e18c..6604a9bb 100644 --- a/lib/NGCP/Schema/kamailio/Result/aliases.pm +++ b/lib/NGCP/Schema/Result/aliases.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::aliases; +package NGCP::Schema::Result::aliases; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("aliases"); +__PACKAGE__->table("kamailio.aliases"); __PACKAGE__->add_columns( @@ -99,7 +99,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::aliases +NGCP::Schema::Result::aliases =head1 COMPONENTS LOADED @@ -111,7 +111,7 @@ NGCP::Schema::kamailio::Result::aliases =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/billing_fees.pm b/lib/NGCP/Schema/Result/billing_fees.pm similarity index 90% rename from lib/NGCP/Schema/billing/Result/billing_fees.pm rename to lib/NGCP/Schema/Result/billing_fees.pm index deb4e268..3cdd7069 100644 --- a/lib/NGCP/Schema/billing/Result/billing_fees.pm +++ b/lib/NGCP/Schema/Result/billing_fees.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_fees; +package NGCP::Schema::Result::billing_fees; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_fees"); +__PACKAGE__->table("billing.billing_fees"); __PACKAGE__->add_columns( @@ -104,7 +104,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "billing_fees_histories", - "NGCP::Schema::billing::Result::billing_fees_history", + "NGCP::Schema::Result::billing_fees_history", { "foreign.bf_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -112,7 +112,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "billing_profile", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { id => "billing_profile_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -120,7 +120,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "billing_zone", - "NGCP::Schema::billing::Result::billing_zones", + "NGCP::Schema::Result::billing_zones", { id => "billing_zone_id" }, { is_deferrable => 1, @@ -139,7 +139,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_fees +NGCP::Schema::Result::billing_fees =head1 COMPONENTS LOADED @@ -151,7 +151,7 @@ NGCP::Schema::billing::Result::billing_fees =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -275,19 +275,19 @@ NGCP::Schema::billing::Result::billing_fees Type: has_many -Related object: L +Related object: L =head2 billing_profile Type: belongs_to -Related object: L +Related object: L =head2 billing_zone Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_fees_history.pm b/lib/NGCP/Schema/Result/billing_fees_history.pm similarity index 92% rename from lib/NGCP/Schema/billing/Result/billing_fees_history.pm rename to lib/NGCP/Schema/Result/billing_fees_history.pm index f9225c73..f8f596e0 100644 --- a/lib/NGCP/Schema/billing/Result/billing_fees_history.pm +++ b/lib/NGCP/Schema/Result/billing_fees_history.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_fees_history; +package NGCP::Schema::Result::billing_fees_history; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_fees_history"); +__PACKAGE__->table("billing.billing_fees_history"); __PACKAGE__->add_columns( @@ -106,7 +106,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "bf", - "NGCP::Schema::billing::Result::billing_fees", + "NGCP::Schema::Result::billing_fees", { id => "bf_id" }, { is_deferrable => 1, @@ -119,7 +119,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "billing_zones_history", - "NGCP::Schema::billing::Result::billing_zones_history", + "NGCP::Schema::Result::billing_zones_history", { id => "billing_zones_history_id" }, { is_deferrable => 1, @@ -138,7 +138,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_fees_history +NGCP::Schema::Result::billing_fees_history =head1 COMPONENTS LOADED @@ -150,7 +150,7 @@ NGCP::Schema::billing::Result::billing_fees_history =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -280,13 +280,13 @@ NGCP::Schema::billing::Result::billing_fees_history Type: belongs_to -Related object: L +Related object: L =head2 billing_zones_history Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_mappings.pm b/lib/NGCP/Schema/Result/billing_mappings.pm similarity index 85% rename from lib/NGCP/Schema/billing/Result/billing_mappings.pm rename to lib/NGCP/Schema/Result/billing_mappings.pm index a2a6257e..ece26c41 100644 --- a/lib/NGCP/Schema/billing/Result/billing_mappings.pm +++ b/lib/NGCP/Schema/Result/billing_mappings.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_mappings; +package NGCP::Schema::Result::billing_mappings; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_mappings"); +__PACKAGE__->table("billing.billing_mappings"); __PACKAGE__->add_columns( @@ -67,7 +67,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "billing_profile", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { id => "billing_profile_id" }, { is_deferrable => 1, @@ -80,7 +80,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -88,7 +88,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "product", - "NGCP::Schema::billing::Result::products", + "NGCP::Schema::Result::products", { id => "product_id" }, { is_deferrable => 1, @@ -107,7 +107,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_mappings +NGCP::Schema::Result::billing_mappings =head1 COMPONENTS LOADED @@ -119,7 +119,7 @@ NGCP::Schema::billing::Result::billing_mappings =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -177,19 +177,19 @@ NGCP::Schema::billing::Result::billing_mappings Type: belongs_to -Related object: L +Related object: L =head2 contract Type: belongs_to -Related object: L +Related object: L =head2 product Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_peaktime_special.pm b/lib/NGCP/Schema/Result/billing_peaktime_special.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/billing_peaktime_special.pm rename to lib/NGCP/Schema/Result/billing_peaktime_special.pm index 1952aea7..d2cefa0e 100644 --- a/lib/NGCP/Schema/billing/Result/billing_peaktime_special.pm +++ b/lib/NGCP/Schema/Result/billing_peaktime_special.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_peaktime_special; +package NGCP::Schema::Result::billing_peaktime_special; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_peaktime_special"); +__PACKAGE__->table("billing.billing_peaktime_special"); __PACKAGE__->add_columns( @@ -53,7 +53,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "billing_profile", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { id => "billing_profile_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_peaktime_special +NGCP::Schema::Result::billing_peaktime_special =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::billing::Result::billing_peaktime_special =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -123,7 +123,7 @@ NGCP::Schema::billing::Result::billing_peaktime_special Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_peaktime_weekdays.pm b/lib/NGCP/Schema/Result/billing_peaktime_weekdays.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/billing_peaktime_weekdays.pm rename to lib/NGCP/Schema/Result/billing_peaktime_weekdays.pm index de223cd5..ad629d4c 100644 --- a/lib/NGCP/Schema/billing/Result/billing_peaktime_weekdays.pm +++ b/lib/NGCP/Schema/Result/billing_peaktime_weekdays.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_peaktime_weekdays; +package NGCP::Schema::Result::billing_peaktime_weekdays; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_peaktime_weekdays"); +__PACKAGE__->table("billing.billing_peaktime_weekdays"); __PACKAGE__->add_columns( @@ -47,7 +47,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "billing_profile", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { id => "billing_profile_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -61,7 +61,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_peaktime_weekdays +NGCP::Schema::Result::billing_peaktime_weekdays =head1 COMPONENTS LOADED @@ -73,7 +73,7 @@ NGCP::Schema::billing::Result::billing_peaktime_weekdays =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -121,7 +121,7 @@ NGCP::Schema::billing::Result::billing_peaktime_weekdays Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_profiles.pm b/lib/NGCP/Schema/Result/billing_profiles.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/billing_profiles.pm rename to lib/NGCP/Schema/Result/billing_profiles.pm index 18b5e5c6..0e8ca6d2 100644 --- a/lib/NGCP/Schema/billing/Result/billing_profiles.pm +++ b/lib/NGCP/Schema/Result/billing_profiles.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_profiles; +package NGCP::Schema::Result::billing_profiles; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_profiles"); +__PACKAGE__->table("billing.billing_profiles"); __PACKAGE__->add_columns( @@ -91,7 +91,7 @@ __PACKAGE__->add_unique_constraint("resnam_idx", ["reseller_id", "name"]); __PACKAGE__->has_many( "billing_fees", - "NGCP::Schema::billing::Result::billing_fees", + "NGCP::Schema::Result::billing_fees", { "foreign.billing_profile_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -99,7 +99,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "billing_mappings", - "NGCP::Schema::billing::Result::billing_mappings", + "NGCP::Schema::Result::billing_mappings", { "foreign.billing_profile_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -107,7 +107,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "billing_peaktime_specials", - "NGCP::Schema::billing::Result::billing_peaktime_special", + "NGCP::Schema::Result::billing_peaktime_special", { "foreign.billing_profile_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -115,7 +115,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "billing_peaktime_weekdays", - "NGCP::Schema::billing::Result::billing_peaktime_weekdays", + "NGCP::Schema::Result::billing_peaktime_weekdays", { "foreign.billing_profile_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -123,7 +123,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "billing_zones", - "NGCP::Schema::billing::Result::billing_zones", + "NGCP::Schema::Result::billing_zones", { "foreign.billing_profile_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -131,7 +131,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "products", - "NGCP::Schema::billing::Result::products", + "NGCP::Schema::Result::products", { "foreign.billing_profile_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -139,7 +139,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -158,7 +158,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_profiles +NGCP::Schema::Result::billing_profiles =head1 COMPONENTS LOADED @@ -170,7 +170,7 @@ NGCP::Schema::billing::Result::billing_profiles =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -328,43 +328,43 @@ NGCP::Schema::billing::Result::billing_profiles Type: has_many -Related object: L +Related object: L =head2 billing_mappings Type: has_many -Related object: L +Related object: L =head2 billing_peaktime_specials Type: has_many -Related object: L +Related object: L =head2 billing_peaktime_weekdays Type: has_many -Related object: L +Related object: L =head2 billing_zones Type: has_many -Related object: L +Related object: L =head2 products Type: has_many -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_zones.pm b/lib/NGCP/Schema/Result/billing_zones.pm similarity index 83% rename from lib/NGCP/Schema/billing/Result/billing_zones.pm rename to lib/NGCP/Schema/Result/billing_zones.pm index c6fd7e58..83355b92 100644 --- a/lib/NGCP/Schema/billing/Result/billing_zones.pm +++ b/lib/NGCP/Schema/Result/billing_zones.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_zones; +package NGCP::Schema::Result::billing_zones; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_zones"); +__PACKAGE__->table("billing.billing_zones"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->add_unique_constraint("profnamdes_idx", ["billing_profile_id", "zon __PACKAGE__->has_many( "billing_fees", - "NGCP::Schema::billing::Result::billing_fees", + "NGCP::Schema::Result::billing_fees", { "foreign.billing_zone_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -56,7 +56,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "billing_profile", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { id => "billing_profile_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -64,7 +64,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "billing_zones_histories", - "NGCP::Schema::billing::Result::billing_zones_history", + "NGCP::Schema::Result::billing_zones_history", { "foreign.bz_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -78,7 +78,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_zones +NGCP::Schema::Result::billing_zones =head1 COMPONENTS LOADED @@ -90,7 +90,7 @@ NGCP::Schema::billing::Result::billing_zones =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -148,19 +148,19 @@ NGCP::Schema::billing::Result::billing_zones Type: has_many -Related object: L +Related object: L =head2 billing_profile Type: belongs_to -Related object: L +Related object: L =head2 billing_zones_histories Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/billing_zones_history.pm b/lib/NGCP/Schema/Result/billing_zones_history.pm similarity index 84% rename from lib/NGCP/Schema/billing/Result/billing_zones_history.pm rename to lib/NGCP/Schema/Result/billing_zones_history.pm index c8ce3112..6a03d810 100644 --- a/lib/NGCP/Schema/billing/Result/billing_zones_history.pm +++ b/lib/NGCP/Schema/Result/billing_zones_history.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::billing_zones_history; +package NGCP::Schema::Result::billing_zones_history; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("billing_zones_history"); +__PACKAGE__->table("billing.billing_zones_history"); __PACKAGE__->add_columns( @@ -47,7 +47,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "billing_fees_histories", - "NGCP::Schema::billing::Result::billing_fees_history", + "NGCP::Schema::Result::billing_fees_history", { "foreign.billing_zones_history_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -55,7 +55,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "bz", - "NGCP::Schema::billing::Result::billing_zones", + "NGCP::Schema::Result::billing_zones", { id => "bz_id" }, { is_deferrable => 1, @@ -74,7 +74,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::billing_zones_history +NGCP::Schema::Result::billing_zones_history =head1 COMPONENTS LOADED @@ -86,7 +86,7 @@ NGCP::Schema::billing::Result::billing_zones_history =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -136,13 +136,13 @@ NGCP::Schema::billing::Result::billing_zones_history Type: has_many -Related object: L +Related object: L =head2 bz Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/carrier/Result/contracts.pm b/lib/NGCP/Schema/Result/carrier_contracts.pm similarity index 85% rename from lib/NGCP/Schema/carrier/Result/contracts.pm rename to lib/NGCP/Schema/Result/carrier_contracts.pm index 136a20a0..096e13a3 100644 --- a/lib/NGCP/Schema/carrier/Result/contracts.pm +++ b/lib/NGCP/Schema/Result/carrier_contracts.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::contracts; +package NGCP::Schema::Result::carrier_contracts; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contracts"); +__PACKAGE__->table("carrier.contracts"); __PACKAGE__->add_columns( @@ -50,7 +50,7 @@ __PACKAGE__->add_unique_constraint("externalid_idx", ["external_id"]); __PACKAGE__->has_many( "credits", - "NGCP::Schema::carrier::Result::credits", + "NGCP::Schema::Result::credits", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -58,7 +58,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "customer", - "NGCP::Schema::carrier::Result::customers", + "NGCP::Schema::Result::carrier_customers", { id => "customer_id" }, { is_deferrable => 1, @@ -71,7 +71,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "subscribers", - "NGCP::Schema::carrier::Result::subscribers", + "NGCP::Schema::Result::subscribers", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -85,7 +85,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::contracts +NGCP::Schema::Result::carrier_contracts =head1 COMPONENTS LOADED @@ -97,7 +97,7 @@ NGCP::Schema::carrier::Result::contracts =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -157,19 +157,19 @@ NGCP::Schema::carrier::Result::contracts Type: has_many -Related object: L +Related object: L =head2 customer Type: belongs_to -Related object: L +Related object: L =head2 subscribers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/carrier/Result/customers.pm b/lib/NGCP/Schema/Result/carrier_customers.pm similarity index 83% rename from lib/NGCP/Schema/carrier/Result/customers.pm rename to lib/NGCP/Schema/Result/carrier_customers.pm index 49a639b8..ed72074d 100644 --- a/lib/NGCP/Schema/carrier/Result/customers.pm +++ b/lib/NGCP/Schema/Result/carrier_customers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::customers; +package NGCP::Schema::Result::carrier_customers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("customers"); +__PACKAGE__->table("carrier.customers"); __PACKAGE__->add_columns( @@ -45,16 +45,16 @@ __PACKAGE__->add_unique_constraint("shopuser_idx", ["shopuser"]); __PACKAGE__->has_many( - "contracts", - "NGCP::Schema::carrier::Result::contracts", + "carrier_contracts", + "NGCP::Schema::Result::carrier_contracts", { "foreign.customer_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); __PACKAGE__->has_many( - "orders", - "NGCP::Schema::carrier::Result::orders", + "carrier_orders", + "NGCP::Schema::Result::carrier_orders", { "foreign.customer_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -68,7 +68,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::customers +NGCP::Schema::Result::carrier_customers =head1 COMPONENTS LOADED @@ -80,7 +80,7 @@ NGCP::Schema::carrier::Result::customers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -137,17 +137,17 @@ NGCP::Schema::carrier::Result::customers =head1 RELATIONS -=head2 contracts +=head2 carrier_contracts Type: has_many -Related object: L +Related object: L -=head2 orders +=head2 carrier_orders Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/carrier/Result/orders.pm b/lib/NGCP/Schema/Result/carrier_orders.pm similarity index 81% rename from lib/NGCP/Schema/carrier/Result/orders.pm rename to lib/NGCP/Schema/Result/carrier_orders.pm index 4bf11e94..3628026b 100644 --- a/lib/NGCP/Schema/carrier/Result/orders.pm +++ b/lib/NGCP/Schema/Result/carrier_orders.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::orders; +package NGCP::Schema::Result::carrier_orders; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("orders"); +__PACKAGE__->table("carrier.orders"); __PACKAGE__->add_columns( @@ -41,15 +41,15 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "customer", - "NGCP::Schema::carrier::Result::customers", + "NGCP::Schema::Result::carrier_customers", { id => "customer_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); __PACKAGE__->has_many( - "payments", - "NGCP::Schema::carrier::Result::payments", + "carrier_payments", + "NGCP::Schema::Result::carrier_payments", { "foreign.order_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -63,7 +63,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::orders +NGCP::Schema::Result::carrier_orders =head1 COMPONENTS LOADED @@ -75,7 +75,7 @@ NGCP::Schema::carrier::Result::orders =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -107,13 +107,13 @@ NGCP::Schema::carrier::Result::orders Type: belongs_to -Related object: L +Related object: L -=head2 payments +=head2 carrier_payments Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/carrier/Result/payments.pm b/lib/NGCP/Schema/Result/carrier_payments.pm similarity index 86% rename from lib/NGCP/Schema/carrier/Result/payments.pm rename to lib/NGCP/Schema/Result/carrier_payments.pm index d166e8c1..6667bf33 100644 --- a/lib/NGCP/Schema/carrier/Result/payments.pm +++ b/lib/NGCP/Schema/Result/carrier_payments.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::payments; +package NGCP::Schema::Result::carrier_payments; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("payments"); +__PACKAGE__->table("carrier.payments"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "credit", - "NGCP::Schema::carrier::Result::credits", + "NGCP::Schema::Result::credits", { id => "credit_id" }, { is_deferrable => 1, @@ -61,7 +61,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "order", - "NGCP::Schema::carrier::Result::orders", + "NGCP::Schema::Result::carrier_orders", { id => "order_id" }, { is_deferrable => 1, @@ -80,7 +80,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::payments +NGCP::Schema::Result::carrier_payments =head1 COMPONENTS LOADED @@ -92,7 +92,7 @@ NGCP::Schema::carrier::Result::payments =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -131,13 +131,13 @@ NGCP::Schema::carrier::Result::payments Type: belongs_to -Related object: L +Related object: L =head2 order Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/accounting/Result/cdr.pm b/lib/NGCP/Schema/Result/cdr.pm similarity index 99% rename from lib/NGCP/Schema/accounting/Result/cdr.pm rename to lib/NGCP/Schema/Result/cdr.pm index a3d92bba..354032e9 100644 --- a/lib/NGCP/Schema/accounting/Result/cdr.pm +++ b/lib/NGCP/Schema/Result/cdr.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::accounting::Result::cdr; +package NGCP::Schema::Result::cdr; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("cdr"); +__PACKAGE__->table("accounting.cdr"); __PACKAGE__->add_columns( @@ -216,7 +216,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::accounting::Result::cdr +NGCP::Schema::Result::cdr =head1 COMPONENTS LOADED @@ -228,7 +228,7 @@ NGCP::Schema::accounting::Result::cdr =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/ngcp/Result/cfg_schema.pm b/lib/NGCP/Schema/Result/cfg_schema.pm similarity index 93% rename from lib/NGCP/Schema/ngcp/Result/cfg_schema.pm rename to lib/NGCP/Schema/Result/cfg_schema.pm index 6582a0c0..a53d8900 100644 --- a/lib/NGCP/Schema/ngcp/Result/cfg_schema.pm +++ b/lib/NGCP/Schema/Result/cfg_schema.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::ngcp::Result::cfg_schema; +package NGCP::Schema::Result::cfg_schema; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("cfg_schema"); +__PACKAGE__->table("ngcp.cfg_schema"); __PACKAGE__->add_columns( @@ -54,7 +54,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::ngcp::Result::cfg_schema +NGCP::Schema::Result::cfg_schema =head1 COMPONENTS LOADED @@ -66,7 +66,7 @@ NGCP::Schema::ngcp::Result::cfg_schema =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/contacts.pm b/lib/NGCP/Schema/Result/contacts.pm similarity index 87% rename from lib/NGCP/Schema/billing/Result/contacts.pm rename to lib/NGCP/Schema/Result/contacts.pm index 839ad228..2a6b0ed8 100644 --- a/lib/NGCP/Schema/billing/Result/contacts.pm +++ b/lib/NGCP/Schema/Result/contacts.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::contacts; +package NGCP::Schema::Result::contacts; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contacts"); +__PACKAGE__->table("billing.contacts"); __PACKAGE__->add_columns( @@ -80,7 +80,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "contracts", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { "foreign.contact_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -88,7 +88,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "customers_comm_contacts", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { "foreign.comm_contact_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -96,7 +96,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "customers_contacts", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { "foreign.contact_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -104,7 +104,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "customers_tech_contacts", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { "foreign.tech_contact_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -112,7 +112,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "orders", - "NGCP::Schema::billing::Result::orders", + "NGCP::Schema::Result::orders", { "foreign.delivery_contact_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -126,7 +126,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::contacts +NGCP::Schema::Result::contacts =head1 COMPONENTS LOADED @@ -138,7 +138,7 @@ NGCP::Schema::billing::Result::contacts =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -260,31 +260,31 @@ NGCP::Schema::billing::Result::contacts Type: has_many -Related object: L +Related object: L =head2 customers_comm_contacts Type: has_many -Related object: L +Related object: L =head2 customers_contacts Type: has_many -Related object: L +Related object: L =head2 customers_tech_contacts Type: has_many -Related object: L +Related object: L =head2 orders Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/contract_balances.pm b/lib/NGCP/Schema/Result/contract_balances.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/contract_balances.pm rename to lib/NGCP/Schema/Result/contract_balances.pm index 2a4b7f02..16a0ce91 100644 --- a/lib/NGCP/Schema/billing/Result/contract_balances.pm +++ b/lib/NGCP/Schema/Result/contract_balances.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::contract_balances; +package NGCP::Schema::Result::contract_balances; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contract_balances"); +__PACKAGE__->table("billing.contract_balances"); __PACKAGE__->add_columns( @@ -68,7 +68,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -76,7 +76,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "contract_credits", - "NGCP::Schema::billing::Result::contract_credits", + "NGCP::Schema::Result::contract_credits", { "foreign.balance_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -84,7 +84,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "invoice", - "NGCP::Schema::billing::Result::invoices", + "NGCP::Schema::Result::invoices", { id => "invoice_id" }, { is_deferrable => 1, @@ -103,7 +103,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::contract_balances +NGCP::Schema::Result::contract_balances =head1 COMPONENTS LOADED @@ -115,7 +115,7 @@ NGCP::Schema::billing::Result::contract_balances =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -188,19 +188,19 @@ NGCP::Schema::billing::Result::contract_balances Type: belongs_to -Related object: L +Related object: L =head2 contract_credits Type: has_many -Related object: L +Related object: L =head2 invoice Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/contract_credits.pm b/lib/NGCP/Schema/Result/contract_credits.pm similarity index 87% rename from lib/NGCP/Schema/billing/Result/contract_credits.pm rename to lib/NGCP/Schema/Result/contract_credits.pm index 72144194..2678de77 100644 --- a/lib/NGCP/Schema/billing/Result/contract_credits.pm +++ b/lib/NGCP/Schema/Result/contract_credits.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::contract_credits; +package NGCP::Schema::Result::contract_credits; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contract_credits"); +__PACKAGE__->table("billing.contract_credits"); __PACKAGE__->add_columns( @@ -66,7 +66,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "balance", - "NGCP::Schema::billing::Result::contract_balances", + "NGCP::Schema::Result::contract_balances", { id => "balance_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -74,7 +74,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "credit_payments", - "NGCP::Schema::billing::Result::credit_payments", + "NGCP::Schema::Result::credit_payments", { "foreign.credit_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -88,7 +88,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::contract_credits +NGCP::Schema::Result::contract_credits =head1 COMPONENTS LOADED @@ -100,7 +100,7 @@ NGCP::Schema::billing::Result::contract_credits =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -163,13 +163,13 @@ NGCP::Schema::billing::Result::contract_credits Type: belongs_to -Related object: L +Related object: L =head2 credit_payments Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/contract_fraud_preferences.pm b/lib/NGCP/Schema/Result/contract_fraud_preferences.pm similarity index 90% rename from lib/NGCP/Schema/billing/Result/contract_fraud_preferences.pm rename to lib/NGCP/Schema/Result/contract_fraud_preferences.pm index f45cded4..672463a3 100644 --- a/lib/NGCP/Schema/billing/Result/contract_fraud_preferences.pm +++ b/lib/NGCP/Schema/Result/contract_fraud_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::contract_fraud_preferences; +package NGCP::Schema::Result::contract_fraud_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contract_fraud_preferences"); +__PACKAGE__->table("billing.contract_fraud_preferences"); __PACKAGE__->add_columns( @@ -56,7 +56,7 @@ __PACKAGE__->add_unique_constraint("contract_id", ["contract_id"]); __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::contract_fraud_preferences +NGCP::Schema::Result::contract_fraud_preferences =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::billing::Result::contract_fraud_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -160,7 +160,7 @@ NGCP::Schema::billing::Result::contract_fraud_preferences Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/contract_registers.pm b/lib/NGCP/Schema/Result/contract_registers.pm similarity index 87% rename from lib/NGCP/Schema/billing/Result/contract_registers.pm rename to lib/NGCP/Schema/Result/contract_registers.pm index c4dac466..13718e9a 100644 --- a/lib/NGCP/Schema/billing/Result/contract_registers.pm +++ b/lib/NGCP/Schema/Result/contract_registers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::contract_registers; +package NGCP::Schema::Result::contract_registers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contract_registers"); +__PACKAGE__->table("billing.contract_registers"); __PACKAGE__->add_columns( @@ -47,7 +47,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -61,7 +61,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::contract_registers +NGCP::Schema::Result::contract_registers =head1 COMPONENTS LOADED @@ -73,7 +73,7 @@ NGCP::Schema::billing::Result::contract_registers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -122,7 +122,7 @@ NGCP::Schema::billing::Result::contract_registers Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/contracts.pm b/lib/NGCP/Schema/Result/contracts.pm similarity index 81% rename from lib/NGCP/Schema/billing/Result/contracts.pm rename to lib/NGCP/Schema/Result/contracts.pm index 3ecc632a..190f954b 100644 --- a/lib/NGCP/Schema/billing/Result/contracts.pm +++ b/lib/NGCP/Schema/Result/contracts.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::contracts; +package NGCP::Schema::Result::contracts; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("contracts"); +__PACKAGE__->table("billing.contracts"); __PACKAGE__->add_columns( @@ -97,7 +97,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->might_have( "active_reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -105,7 +105,7 @@ __PACKAGE__->might_have( __PACKAGE__->has_many( "billing_mappings", - "NGCP::Schema::billing::Result::billing_mappings", + "NGCP::Schema::Result::billing_mappings", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -113,7 +113,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "contact", - "NGCP::Schema::billing::Result::contacts", + "NGCP::Schema::Result::contacts", { id => "contact_id" }, { is_deferrable => 1, @@ -126,7 +126,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "contract_balances", - "NGCP::Schema::billing::Result::contract_balances", + "NGCP::Schema::Result::contract_balances", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -134,7 +134,7 @@ __PACKAGE__->has_many( __PACKAGE__->might_have( "contract_fraud_preference", - "NGCP::Schema::billing::Result::contract_fraud_preferences", + "NGCP::Schema::Result::contract_fraud_preferences", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -142,7 +142,7 @@ __PACKAGE__->might_have( __PACKAGE__->has_many( "contract_registers", - "NGCP::Schema::billing::Result::contract_registers", + "NGCP::Schema::Result::contract_registers", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -150,7 +150,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "customer", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { id => "customer_id" }, { is_deferrable => 1, @@ -163,7 +163,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "order", - "NGCP::Schema::billing::Result::orders", + "NGCP::Schema::Result::orders", { id => "order_id" }, { is_deferrable => 1, @@ -176,7 +176,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -189,7 +189,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_subscribers", - "NGCP::Schema::billing::Result::voip_subscribers", + "NGCP::Schema::Result::voip_subscribers", { "foreign.contract_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -203,7 +203,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::contracts +NGCP::Schema::Result::contracts =head1 COMPONENTS LOADED @@ -215,7 +215,7 @@ NGCP::Schema::billing::Result::contracts =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -307,61 +307,61 @@ NGCP::Schema::billing::Result::contracts Type: might_have -Related object: L +Related object: L =head2 billing_mappings Type: has_many -Related object: L +Related object: L =head2 contact Type: belongs_to -Related object: L +Related object: L =head2 contract_balances Type: has_many -Related object: L +Related object: L =head2 contract_fraud_preference Type: might_have -Related object: L +Related object: L =head2 contract_registers Type: has_many -Related object: L +Related object: L =head2 customer Type: belongs_to -Related object: L +Related object: L =head2 order Type: belongs_to -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =head2 voip_subscribers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/credit_payments.pm b/lib/NGCP/Schema/Result/credit_payments.pm similarity index 84% rename from lib/NGCP/Schema/billing/Result/credit_payments.pm rename to lib/NGCP/Schema/Result/credit_payments.pm index 7bca1693..9d9feb44 100644 --- a/lib/NGCP/Schema/billing/Result/credit_payments.pm +++ b/lib/NGCP/Schema/Result/credit_payments.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::credit_payments; +package NGCP::Schema::Result::credit_payments; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("credit_payments"); +__PACKAGE__->table("billing.credit_payments"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "credit", - "NGCP::Schema::billing::Result::contract_credits", + "NGCP::Schema::Result::contract_credits", { id => "credit_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "payment", - "NGCP::Schema::billing::Result::payments", + "NGCP::Schema::Result::payments", { id => "payment_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::credit_payments +NGCP::Schema::Result::credit_payments =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::billing::Result::credit_payments =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -121,13 +121,13 @@ NGCP::Schema::billing::Result::credit_payments Type: belongs_to -Related object: L +Related object: L =head2 payment Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/carrier/Result/credits.pm b/lib/NGCP/Schema/Result/credits.pm similarity index 82% rename from lib/NGCP/Schema/carrier/Result/credits.pm rename to lib/NGCP/Schema/Result/credits.pm index a4e4645e..54acd4d0 100644 --- a/lib/NGCP/Schema/carrier/Result/credits.pm +++ b/lib/NGCP/Schema/Result/credits.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::credits; +package NGCP::Schema::Result::credits; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("credits"); +__PACKAGE__->table("carrier.credits"); __PACKAGE__->add_columns( @@ -41,15 +41,15 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::carrier::Result::contracts", + "NGCP::Schema::Result::carrier_contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); __PACKAGE__->has_many( - "payments", - "NGCP::Schema::carrier::Result::payments", + "carrier_payments", + "NGCP::Schema::Result::carrier_payments", { "foreign.credit_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -63,7 +63,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::credits +NGCP::Schema::Result::credits =head1 COMPONENTS LOADED @@ -75,7 +75,7 @@ NGCP::Schema::carrier::Result::credits =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -107,13 +107,13 @@ NGCP::Schema::carrier::Result::credits Type: belongs_to -Related object: L +Related object: L -=head2 payments +=head2 carrier_payments Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/customer_registers.pm b/lib/NGCP/Schema/Result/customer_registers.pm similarity index 87% rename from lib/NGCP/Schema/billing/Result/customer_registers.pm rename to lib/NGCP/Schema/Result/customer_registers.pm index deef6629..b6bceeba 100644 --- a/lib/NGCP/Schema/billing/Result/customer_registers.pm +++ b/lib/NGCP/Schema/Result/customer_registers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::customer_registers; +package NGCP::Schema::Result::customer_registers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("customer_registers"); +__PACKAGE__->table("billing.customer_registers"); __PACKAGE__->add_columns( @@ -47,7 +47,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "customer", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { id => "customer_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -61,7 +61,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::customer_registers +NGCP::Schema::Result::customer_registers =head1 COMPONENTS LOADED @@ -73,7 +73,7 @@ NGCP::Schema::billing::Result::customer_registers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -122,7 +122,7 @@ NGCP::Schema::billing::Result::customer_registers Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/customers.pm b/lib/NGCP/Schema/Result/customers.pm similarity index 85% rename from lib/NGCP/Schema/billing/Result/customers.pm rename to lib/NGCP/Schema/Result/customers.pm index 5a9618d5..e0b59a9c 100644 --- a/lib/NGCP/Schema/billing/Result/customers.pm +++ b/lib/NGCP/Schema/Result/customers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::customers; +package NGCP::Schema::Result::customers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("customers"); +__PACKAGE__->table("billing.customers"); __PACKAGE__->add_columns( @@ -87,7 +87,7 @@ __PACKAGE__->add_unique_constraint("reseller_id", ["reseller_id", "shopuser"]); __PACKAGE__->belongs_to( "comm_contact", - "NGCP::Schema::billing::Result::contacts", + "NGCP::Schema::Result::contacts", { id => "comm_contact_id" }, { is_deferrable => 1, @@ -100,7 +100,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "contact", - "NGCP::Schema::billing::Result::contacts", + "NGCP::Schema::Result::contacts", { id => "contact_id" }, { is_deferrable => 1, @@ -113,7 +113,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "contracts", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { "foreign.customer_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -121,7 +121,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "customer_registers", - "NGCP::Schema::billing::Result::customer_registers", + "NGCP::Schema::Result::customer_registers", { "foreign.customer_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -129,7 +129,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "orders", - "NGCP::Schema::billing::Result::orders", + "NGCP::Schema::Result::orders", { "foreign.customer_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -137,7 +137,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -150,7 +150,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "tech_contact", - "NGCP::Schema::billing::Result::contacts", + "NGCP::Schema::Result::contacts", { id => "tech_contact_id" }, { is_deferrable => 1, @@ -169,7 +169,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::customers +NGCP::Schema::Result::customers =head1 COMPONENTS LOADED @@ -181,7 +181,7 @@ NGCP::Schema::billing::Result::customers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -284,43 +284,43 @@ NGCP::Schema::billing::Result::customers Type: belongs_to -Related object: L +Related object: L =head2 contact Type: belongs_to -Related object: L +Related object: L =head2 contracts Type: has_many -Related object: L +Related object: L =head2 customer_registers Type: has_many -Related object: L +Related object: L =head2 orders Type: has_many -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =head2 tech_contact Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/ngcp/Result/db_schema.pm b/lib/NGCP/Schema/Result/db_schema.pm similarity index 93% rename from lib/NGCP/Schema/ngcp/Result/db_schema.pm rename to lib/NGCP/Schema/Result/db_schema.pm index c8ed5eaa..50ecdda8 100644 --- a/lib/NGCP/Schema/ngcp/Result/db_schema.pm +++ b/lib/NGCP/Schema/Result/db_schema.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::ngcp::Result::db_schema; +package NGCP::Schema::Result::db_schema; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("db_schema"); +__PACKAGE__->table("ngcp.db_schema"); __PACKAGE__->add_columns( @@ -54,7 +54,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::ngcp::Result::db_schema +NGCP::Schema::Result::db_schema =head1 COMPONENTS LOADED @@ -66,7 +66,7 @@ NGCP::Schema::ngcp::Result::db_schema =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/dbaliases.pm b/lib/NGCP/Schema/Result/dbaliases.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/dbaliases.pm rename to lib/NGCP/Schema/Result/dbaliases.pm index 2612ab6d..0c266070 100644 --- a/lib/NGCP/Schema/kamailio/Result/dbaliases.pm +++ b/lib/NGCP/Schema/Result/dbaliases.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::dbaliases; +package NGCP::Schema::Result::dbaliases; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("dbaliases"); +__PACKAGE__->table("kamailio.dbaliases"); __PACKAGE__->add_columns( @@ -51,7 +51,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::dbaliases +NGCP::Schema::Result::dbaliases =head1 COMPONENTS LOADED @@ -63,7 +63,7 @@ NGCP::Schema::kamailio::Result::dbaliases =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/dialog.pm b/lib/NGCP/Schema/Result/dialog.pm similarity index 97% rename from lib/NGCP/Schema/kamailio/Result/dialog.pm rename to lib/NGCP/Schema/Result/dialog.pm index f7e35e08..72874824 100644 --- a/lib/NGCP/Schema/kamailio/Result/dialog.pm +++ b/lib/NGCP/Schema/Result/dialog.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::dialog; +package NGCP::Schema::Result::dialog; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("dialog"); +__PACKAGE__->table("kamailio.dialog"); __PACKAGE__->add_columns( @@ -101,7 +101,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::dialog +NGCP::Schema::Result::dialog =head1 COMPONENTS LOADED @@ -113,7 +113,7 @@ NGCP::Schema::kamailio::Result::dialog =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/dialog_vars.pm b/lib/NGCP/Schema/Result/dialog_vars.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/dialog_vars.pm rename to lib/NGCP/Schema/Result/dialog_vars.pm index 48e051c9..243b7e2d 100644 --- a/lib/NGCP/Schema/kamailio/Result/dialog_vars.pm +++ b/lib/NGCP/Schema/Result/dialog_vars.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::dialog_vars; +package NGCP::Schema::Result::dialog_vars; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("dialog_vars"); +__PACKAGE__->table("kamailio.dialog_vars"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::dialog_vars +NGCP::Schema::Result::dialog_vars =head1 COMPONENTS LOADED @@ -60,7 +60,7 @@ NGCP::Schema::kamailio::Result::dialog_vars =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/dialplan.pm b/lib/NGCP/Schema/Result/dialplan.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/dialplan.pm rename to lib/NGCP/Schema/Result/dialplan.pm index 30ea3001..c87817a0 100644 --- a/lib/NGCP/Schema/kamailio/Result/dialplan.pm +++ b/lib/NGCP/Schema/Result/dialplan.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::dialplan; +package NGCP::Schema::Result::dialplan; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("dialplan"); +__PACKAGE__->table("kamailio.dialplan"); __PACKAGE__->add_columns( @@ -56,7 +56,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::dialplan +NGCP::Schema::Result::dialplan =head1 COMPONENTS LOADED @@ -68,7 +68,7 @@ NGCP::Schema::kamailio::Result::dialplan =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/dispatcher.pm b/lib/NGCP/Schema/Result/dispatcher.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/dispatcher.pm rename to lib/NGCP/Schema/Result/dispatcher.pm index 335dca48..de16db77 100644 --- a/lib/NGCP/Schema/kamailio/Result/dispatcher.pm +++ b/lib/NGCP/Schema/Result/dispatcher.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::dispatcher; +package NGCP::Schema::Result::dispatcher; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("dispatcher"); +__PACKAGE__->table("kamailio.dispatcher"); __PACKAGE__->add_columns( @@ -52,7 +52,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::dispatcher +NGCP::Schema::Result::dispatcher =head1 COMPONENTS LOADED @@ -64,7 +64,7 @@ NGCP::Schema::kamailio::Result::dispatcher =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/dom_preferences.pm b/lib/NGCP/Schema/Result/dom_preferences.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/dom_preferences.pm rename to lib/NGCP/Schema/Result/dom_preferences.pm index f1861ad9..a803e29f 100644 --- a/lib/NGCP/Schema/kamailio/Result/dom_preferences.pm +++ b/lib/NGCP/Schema/Result/dom_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::dom_preferences; +package NGCP::Schema::Result::dom_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("dom_preferences"); +__PACKAGE__->table("kamailio.dom_preferences"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::dom_preferences +NGCP::Schema::Result::dom_preferences =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::dom_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/domain.pm b/lib/NGCP/Schema/Result/domain.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/domain.pm rename to lib/NGCP/Schema/Result/domain.pm index c30ac178..a2b71c39 100644 --- a/lib/NGCP/Schema/kamailio/Result/domain.pm +++ b/lib/NGCP/Schema/Result/domain.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::domain; +package NGCP::Schema::Result::domain; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("domain"); +__PACKAGE__->table("kamailio.domain"); __PACKAGE__->add_columns( @@ -54,7 +54,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::domain +NGCP::Schema::Result::domain =head1 COMPONENTS LOADED @@ -66,7 +66,7 @@ NGCP::Schema::kamailio::Result::domain =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/domain_attrs.pm b/lib/NGCP/Schema/Result/domain_attrs.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/domain_attrs.pm rename to lib/NGCP/Schema/Result/domain_attrs.pm index 4a049a16..c6ac93af 100644 --- a/lib/NGCP/Schema/kamailio/Result/domain_attrs.pm +++ b/lib/NGCP/Schema/Result/domain_attrs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::domain_attrs; +package NGCP::Schema::Result::domain_attrs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("domain_attrs"); +__PACKAGE__->table("kamailio.domain_attrs"); __PACKAGE__->add_columns( @@ -58,7 +58,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::domain_attrs +NGCP::Schema::Result::domain_attrs =head1 COMPONENTS LOADED @@ -70,7 +70,7 @@ NGCP::Schema::kamailio::Result::domain_attrs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/domain_resellers.pm b/lib/NGCP/Schema/Result/domain_resellers.pm similarity index 84% rename from lib/NGCP/Schema/billing/Result/domain_resellers.pm rename to lib/NGCP/Schema/Result/domain_resellers.pm index d444a20c..392727a0 100644 --- a/lib/NGCP/Schema/billing/Result/domain_resellers.pm +++ b/lib/NGCP/Schema/Result/domain_resellers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::domain_resellers; +package NGCP::Schema::Result::domain_resellers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("domain_resellers"); +__PACKAGE__->table("billing.domain_resellers"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "domain", - "NGCP::Schema::billing::Result::domains", + "NGCP::Schema::Result::domains", { id => "domain_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::domain_resellers +NGCP::Schema::Result::domain_resellers =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::billing::Result::domain_resellers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -121,13 +121,13 @@ NGCP::Schema::billing::Result::domain_resellers Type: belongs_to -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/domains.pm b/lib/NGCP/Schema/Result/domains.pm similarity index 83% rename from lib/NGCP/Schema/billing/Result/domains.pm rename to lib/NGCP/Schema/Result/domains.pm index 787b885c..90f864d6 100644 --- a/lib/NGCP/Schema/billing/Result/domains.pm +++ b/lib/NGCP/Schema/Result/domains.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::domains; +package NGCP::Schema::Result::domains; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("domains"); +__PACKAGE__->table("billing.domains"); __PACKAGE__->add_columns( @@ -39,7 +39,7 @@ __PACKAGE__->add_unique_constraint("domain_idx", ["domain"]); __PACKAGE__->has_many( "domain_resellers", - "NGCP::Schema::billing::Result::domain_resellers", + "NGCP::Schema::Result::domain_resellers", { "foreign.domain_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -47,7 +47,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_subscribers", - "NGCP::Schema::billing::Result::voip_subscribers", + "NGCP::Schema::Result::voip_subscribers", { "foreign.domain_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -61,7 +61,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::domains +NGCP::Schema::Result::domains =head1 COMPONENTS LOADED @@ -73,7 +73,7 @@ NGCP::Schema::billing::Result::domains =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -114,13 +114,13 @@ NGCP::Schema::billing::Result::domains Type: has_many -Related object: L +Related object: L =head2 voip_subscribers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/fax_destinations.pm b/lib/NGCP/Schema/Result/fax_destinations.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/fax_destinations.pm rename to lib/NGCP/Schema/Result/fax_destinations.pm index ad639165..e2ca7b31 100644 --- a/lib/NGCP/Schema/kamailio/Result/fax_destinations.pm +++ b/lib/NGCP/Schema/Result/fax_destinations.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::fax_destinations; +package NGCP::Schema::Result::fax_destinations; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("fax_destinations"); +__PACKAGE__->table("kamailio.fax_destinations"); __PACKAGE__->add_columns( @@ -79,7 +79,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::fax_destinations +NGCP::Schema::Result::fax_destinations =head1 COMPONENTS LOADED @@ -91,7 +91,7 @@ NGCP::Schema::kamailio::Result::fax_destinations =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/fax_journal.pm b/lib/NGCP/Schema/Result/fax_journal.pm similarity index 95% rename from lib/NGCP/Schema/kamailio/Result/fax_journal.pm rename to lib/NGCP/Schema/Result/fax_journal.pm index 2f65fab1..bbdbdf24 100644 --- a/lib/NGCP/Schema/kamailio/Result/fax_journal.pm +++ b/lib/NGCP/Schema/Result/fax_journal.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::fax_journal; +package NGCP::Schema::Result::fax_journal; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("fax_journal"); +__PACKAGE__->table("kamailio.fax_journal"); __PACKAGE__->add_columns( @@ -94,7 +94,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::fax_journal +NGCP::Schema::Result::fax_journal =head1 COMPONENTS LOADED @@ -106,7 +106,7 @@ NGCP::Schema::kamailio::Result::fax_journal =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/fax_preferences.pm b/lib/NGCP/Schema/Result/fax_preferences.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/fax_preferences.pm rename to lib/NGCP/Schema/Result/fax_preferences.pm index 3354eeae..aa551e24 100644 --- a/lib/NGCP/Schema/kamailio/Result/fax_preferences.pm +++ b/lib/NGCP/Schema/Result/fax_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::fax_preferences; +package NGCP::Schema::Result::fax_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("fax_preferences"); +__PACKAGE__->table("kamailio.fax_preferences"); __PACKAGE__->add_columns( @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::fax_preferences +NGCP::Schema::Result::fax_preferences =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::kamailio::Result::fax_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/htable.pm b/lib/NGCP/Schema/Result/htable.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/htable.pm rename to lib/NGCP/Schema/Result/htable.pm index ce3042dd..a48195a4 100644 --- a/lib/NGCP/Schema/kamailio/Result/htable.pm +++ b/lib/NGCP/Schema/Result/htable.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::htable; +package NGCP::Schema::Result::htable; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("htable"); +__PACKAGE__->table("kamailio.htable"); __PACKAGE__->add_columns( @@ -50,7 +50,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::htable +NGCP::Schema::Result::htable =head1 COMPONENTS LOADED @@ -62,7 +62,7 @@ NGCP::Schema::kamailio::Result::htable =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/carrier/Result/interceptions.pm b/lib/NGCP/Schema/Result/interceptions.pm similarity index 89% rename from lib/NGCP/Schema/carrier/Result/interceptions.pm rename to lib/NGCP/Schema/Result/interceptions.pm index 5961ac81..70e2fe36 100644 --- a/lib/NGCP/Schema/carrier/Result/interceptions.pm +++ b/lib/NGCP/Schema/Result/interceptions.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::interceptions; +package NGCP::Schema::Result::interceptions; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("interceptions"); +__PACKAGE__->table("carrier.interceptions"); __PACKAGE__->add_columns( @@ -42,7 +42,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::interceptions +NGCP::Schema::Result::interceptions =head1 COMPONENTS LOADED @@ -54,7 +54,7 @@ NGCP::Schema::carrier::Result::interceptions =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/invoices.pm b/lib/NGCP/Schema/Result/invoices.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/invoices.pm rename to lib/NGCP/Schema/Result/invoices.pm index 18891f1d..f86912d6 100644 --- a/lib/NGCP/Schema/billing/Result/invoices.pm +++ b/lib/NGCP/Schema/Result/invoices.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::invoices; +package NGCP::Schema::Result::invoices; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("invoices"); +__PACKAGE__->table("billing.invoices"); __PACKAGE__->add_columns( @@ -45,7 +45,7 @@ __PACKAGE__->add_unique_constraint("yms_idx", ["year", "month", "serial"]); __PACKAGE__->has_many( "contract_balances", - "NGCP::Schema::billing::Result::contract_balances", + "NGCP::Schema::Result::contract_balances", { "foreign.invoice_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -53,7 +53,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "orders", - "NGCP::Schema::billing::Result::orders", + "NGCP::Schema::Result::orders", { "foreign.invoice_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::invoices +NGCP::Schema::Result::invoices =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::billing::Result::invoices =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -141,13 +141,13 @@ NGCP::Schema::billing::Result::invoices Type: has_many -Related object: L +Related object: L =head2 orders Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/acc.pm b/lib/NGCP/Schema/Result/kamailio_acc.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/acc.pm rename to lib/NGCP/Schema/Result/kamailio_acc.pm index 93d9d83d..a304332e 100644 --- a/lib/NGCP/Schema/kamailio/Result/acc.pm +++ b/lib/NGCP/Schema/Result/kamailio_acc.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::acc; +package NGCP::Schema::Result::kamailio_acc; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("acc"); +__PACKAGE__->table("kamailio.acc"); __PACKAGE__->add_columns( @@ -81,7 +81,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::acc +NGCP::Schema::Result::kamailio_acc =head1 COMPONENTS LOADED @@ -93,7 +93,7 @@ NGCP::Schema::kamailio::Result::acc =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/acc_backup.pm b/lib/NGCP/Schema/Result/kamailio_acc_backup.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/acc_backup.pm rename to lib/NGCP/Schema/Result/kamailio_acc_backup.pm index 3ea76ea1..11d9bc99 100644 --- a/lib/NGCP/Schema/kamailio/Result/acc_backup.pm +++ b/lib/NGCP/Schema/Result/kamailio_acc_backup.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::acc_backup; +package NGCP::Schema::Result::kamailio_acc_backup; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("acc_backup"); +__PACKAGE__->table("kamailio.acc_backup"); __PACKAGE__->add_columns( @@ -81,7 +81,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::acc_backup +NGCP::Schema::Result::kamailio_acc_backup =head1 COMPONENTS LOADED @@ -93,7 +93,7 @@ NGCP::Schema::kamailio::Result::acc_backup =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/acc_trash.pm b/lib/NGCP/Schema/Result/kamailio_acc_trash.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/acc_trash.pm rename to lib/NGCP/Schema/Result/kamailio_acc_trash.pm index 932e20fa..322d3801 100644 --- a/lib/NGCP/Schema/kamailio/Result/acc_trash.pm +++ b/lib/NGCP/Schema/Result/kamailio_acc_trash.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::acc_trash; +package NGCP::Schema::Result::kamailio_acc_trash; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("acc_trash"); +__PACKAGE__->table("kamailio.acc_trash"); __PACKAGE__->add_columns( @@ -81,7 +81,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::acc_trash +NGCP::Schema::Result::kamailio_acc_trash =head1 COMPONENTS LOADED @@ -93,7 +93,7 @@ NGCP::Schema::kamailio::Result::acc_trash =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/provisioning/Result/language_strings.pm b/lib/NGCP/Schema/Result/language_strings.pm similarity index 90% rename from lib/NGCP/Schema/provisioning/Result/language_strings.pm rename to lib/NGCP/Schema/Result/language_strings.pm index 23cfe46b..d9177445 100644 --- a/lib/NGCP/Schema/provisioning/Result/language_strings.pm +++ b/lib/NGCP/Schema/Result/language_strings.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::language_strings; +package NGCP::Schema::Result::language_strings; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("language_strings"); +__PACKAGE__->table("provisioning.language_strings"); __PACKAGE__->add_columns( @@ -49,7 +49,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::language_strings +NGCP::Schema::Result::language_strings =head1 COMPONENTS LOADED @@ -61,7 +61,7 @@ NGCP::Schema::provisioning::Result::language_strings =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/lcr_gw.pm b/lib/NGCP/Schema/Result/lcr_gw.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/lcr_gw.pm rename to lib/NGCP/Schema/Result/lcr_gw.pm index b7ad9981..96a0d551 100644 --- a/lib/NGCP/Schema/kamailio/Result/lcr_gw.pm +++ b/lib/NGCP/Schema/Result/lcr_gw.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::lcr_gw; +package NGCP::Schema::Result::lcr_gw; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("lcr_gw"); +__PACKAGE__->table("kamailio.lcr_gw"); __PACKAGE__->add_columns( @@ -73,7 +73,7 @@ __PACKAGE__->add_unique_constraint("lcr_id_ip_addr_idx", ["lcr_id", "ip_addr"]); __PACKAGE__->has_many( "lcr_rule_targets", - "NGCP::Schema::kamailio::Result::lcr_rule_target", + "NGCP::Schema::Result::lcr_rule_target", { "foreign.gw_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -87,7 +87,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::lcr_gw +NGCP::Schema::Result::lcr_gw =head1 COMPONENTS LOADED @@ -99,7 +99,7 @@ NGCP::Schema::kamailio::Result::lcr_gw =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -231,7 +231,7 @@ NGCP::Schema::kamailio::Result::lcr_gw Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/lcr_rule.pm b/lib/NGCP/Schema/Result/lcr_rule.pm similarity index 91% rename from lib/NGCP/Schema/kamailio/Result/lcr_rule.pm rename to lib/NGCP/Schema/Result/lcr_rule.pm index 05142f8f..0c9ae48b 100644 --- a/lib/NGCP/Schema/kamailio/Result/lcr_rule.pm +++ b/lib/NGCP/Schema/Result/lcr_rule.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::lcr_rule; +package NGCP::Schema::Result::lcr_rule; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("lcr_rule"); +__PACKAGE__->table("kamailio.lcr_rule"); __PACKAGE__->add_columns( @@ -64,7 +64,7 @@ __PACKAGE__->add_unique_constraint( __PACKAGE__->has_many( "lcr_rule_targets", - "NGCP::Schema::kamailio::Result::lcr_rule_target", + "NGCP::Schema::Result::lcr_rule_target", { "foreign.rule_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -78,7 +78,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::lcr_rule +NGCP::Schema::Result::lcr_rule =head1 COMPONENTS LOADED @@ -90,7 +90,7 @@ NGCP::Schema::kamailio::Result::lcr_rule =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -178,7 +178,7 @@ NGCP::Schema::kamailio::Result::lcr_rule Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/lcr_rule_target.pm b/lib/NGCP/Schema/Result/lcr_rule_target.pm similarity index 88% rename from lib/NGCP/Schema/kamailio/Result/lcr_rule_target.pm rename to lib/NGCP/Schema/Result/lcr_rule_target.pm index ceee80ba..f0cfc091 100644 --- a/lib/NGCP/Schema/kamailio/Result/lcr_rule_target.pm +++ b/lib/NGCP/Schema/Result/lcr_rule_target.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::lcr_rule_target; +package NGCP::Schema::Result::lcr_rule_target; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("lcr_rule_target"); +__PACKAGE__->table("kamailio.lcr_rule_target"); __PACKAGE__->add_columns( @@ -62,7 +62,7 @@ __PACKAGE__->add_unique_constraint("rule_id_gw_id_idx", ["rule_id", "gw_id"]); __PACKAGE__->belongs_to( "gw", - "NGCP::Schema::kamailio::Result::lcr_gw", + "NGCP::Schema::Result::lcr_gw", { id => "gw_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "rule", - "NGCP::Schema::kamailio::Result::lcr_rule", + "NGCP::Schema::Result::lcr_rule", { id => "rule_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -84,7 +84,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::lcr_rule_target +NGCP::Schema::Result::lcr_rule_target =head1 COMPONENTS LOADED @@ -96,7 +96,7 @@ NGCP::Schema::kamailio::Result::lcr_rule_target =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -166,13 +166,13 @@ NGCP::Schema::kamailio::Result::lcr_rule_target Type: belongs_to -Related object: L +Related object: L =head2 rule Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/lnp_numbers.pm b/lib/NGCP/Schema/Result/lnp_numbers.pm similarity index 89% rename from lib/NGCP/Schema/billing/Result/lnp_numbers.pm rename to lib/NGCP/Schema/Result/lnp_numbers.pm index ed86cc41..54c5860a 100644 --- a/lib/NGCP/Schema/billing/Result/lnp_numbers.pm +++ b/lib/NGCP/Schema/Result/lnp_numbers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::lnp_numbers; +package NGCP::Schema::Result::lnp_numbers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("lnp_numbers"); +__PACKAGE__->table("billing.lnp_numbers"); __PACKAGE__->add_columns( @@ -55,7 +55,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "lnp_provider", - "NGCP::Schema::billing::Result::lnp_providers", + "NGCP::Schema::Result::lnp_providers", { id => "lnp_provider_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -69,7 +69,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::lnp_numbers +NGCP::Schema::Result::lnp_numbers =head1 COMPONENTS LOADED @@ -81,7 +81,7 @@ NGCP::Schema::billing::Result::lnp_numbers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -131,7 +131,7 @@ NGCP::Schema::billing::Result::lnp_numbers Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/lnp_providers.pm b/lib/NGCP/Schema/Result/lnp_providers.pm similarity index 81% rename from lib/NGCP/Schema/billing/Result/lnp_providers.pm rename to lib/NGCP/Schema/Result/lnp_providers.pm index 9fe37300..64a90352 100644 --- a/lib/NGCP/Schema/billing/Result/lnp_providers.pm +++ b/lib/NGCP/Schema/Result/lnp_providers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::lnp_providers; +package NGCP::Schema::Result::lnp_providers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("lnp_providers"); +__PACKAGE__->table("billing.lnp_providers"); __PACKAGE__->add_columns( @@ -31,7 +31,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "lnp_numbers", - "NGCP::Schema::billing::Result::lnp_numbers", + "NGCP::Schema::Result::lnp_numbers", { "foreign.lnp_provider_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -39,7 +39,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "ncos_lnp_lists", - "NGCP::Schema::billing::Result::ncos_lnp_list", + "NGCP::Schema::Result::ncos_lnp_list", { "foreign.lnp_provider_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -53,7 +53,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::lnp_providers +NGCP::Schema::Result::lnp_providers =head1 COMPONENTS LOADED @@ -65,7 +65,7 @@ NGCP::Schema::billing::Result::lnp_providers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -95,13 +95,13 @@ NGCP::Schema::billing::Result::lnp_providers Type: has_many -Related object: L +Related object: L =head2 ncos_lnp_lists Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/location.pm b/lib/NGCP/Schema/Result/location.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/location.pm rename to lib/NGCP/Schema/Result/location.pm index 663f43a6..35f4d3f8 100644 --- a/lib/NGCP/Schema/kamailio/Result/location.pm +++ b/lib/NGCP/Schema/Result/location.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::location; +package NGCP::Schema::Result::location; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("location"); +__PACKAGE__->table("kamailio.location"); __PACKAGE__->add_columns( @@ -99,7 +99,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::location +NGCP::Schema::Result::location =head1 COMPONENTS LOADED @@ -111,7 +111,7 @@ NGCP::Schema::kamailio::Result::location =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/location_attrs.pm b/lib/NGCP/Schema/Result/location_attrs.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/location_attrs.pm rename to lib/NGCP/Schema/Result/location_attrs.pm index d73d0735..9b03eed7 100644 --- a/lib/NGCP/Schema/kamailio/Result/location_attrs.pm +++ b/lib/NGCP/Schema/Result/location_attrs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::location_attrs; +package NGCP::Schema::Result::location_attrs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("location_attrs"); +__PACKAGE__->table("kamailio.location_attrs"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::location_attrs +NGCP::Schema::Result::location_attrs =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::location_attrs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/accounting/Result/mark.pm b/lib/NGCP/Schema/Result/mark.pm similarity index 92% rename from lib/NGCP/Schema/accounting/Result/mark.pm rename to lib/NGCP/Schema/Result/mark.pm index b255134c..9565d327 100644 --- a/lib/NGCP/Schema/accounting/Result/mark.pm +++ b/lib/NGCP/Schema/Result/mark.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::accounting::Result::mark; +package NGCP::Schema::Result::mark; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("mark"); +__PACKAGE__->table("accounting.mark"); __PACKAGE__->add_columns( @@ -44,7 +44,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::accounting::Result::mark +NGCP::Schema::Result::mark =head1 COMPONENTS LOADED @@ -56,7 +56,7 @@ NGCP::Schema::accounting::Result::mark =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/sipstats/Result/message_packets.pm b/lib/NGCP/Schema/Result/message_packets.pm similarity index 88% rename from lib/NGCP/Schema/sipstats/Result/message_packets.pm rename to lib/NGCP/Schema/Result/message_packets.pm index eaf467b5..bef5d4d0 100644 --- a/lib/NGCP/Schema/sipstats/Result/message_packets.pm +++ b/lib/NGCP/Schema/Result/message_packets.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::sipstats::Result::message_packets; +package NGCP::Schema::Result::message_packets; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("message_packets"); +__PACKAGE__->table("sipstats.message_packets"); __PACKAGE__->add_columns( @@ -37,7 +37,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::sipstats::Result::message_packets +NGCP::Schema::Result::message_packets =head1 COMPONENTS LOADED @@ -49,7 +49,7 @@ NGCP::Schema::sipstats::Result::message_packets =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/sipstats/Result/messages.pm b/lib/NGCP/Schema/Result/messages.pm similarity index 96% rename from lib/NGCP/Schema/sipstats/Result/messages.pm rename to lib/NGCP/Schema/Result/messages.pm index 42069500..76387112 100644 --- a/lib/NGCP/Schema/sipstats/Result/messages.pm +++ b/lib/NGCP/Schema/Result/messages.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::sipstats::Result::messages; +package NGCP::Schema::Result::messages; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("messages"); +__PACKAGE__->table("sipstats.messages"); __PACKAGE__->add_columns( @@ -83,7 +83,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::sipstats::Result::messages +NGCP::Schema::Result::messages =head1 COMPONENTS LOADED @@ -95,7 +95,7 @@ NGCP::Schema::sipstats::Result::messages =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/mobile_push_registrations.pm b/lib/NGCP/Schema/Result/mobile_push_registrations.pm similarity index 89% rename from lib/NGCP/Schema/kamailio/Result/mobile_push_registrations.pm rename to lib/NGCP/Schema/Result/mobile_push_registrations.pm index 0b1a6e04..193937a2 100644 --- a/lib/NGCP/Schema/kamailio/Result/mobile_push_registrations.pm +++ b/lib/NGCP/Schema/Result/mobile_push_registrations.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::mobile_push_registrations; +package NGCP::Schema::Result::mobile_push_registrations; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("mobile_push_registrations"); +__PACKAGE__->table("kamailio.mobile_push_registrations"); __PACKAGE__->add_columns( @@ -55,7 +55,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::mobile_push_registrations +NGCP::Schema::Result::mobile_push_registrations =head1 COMPONENTS LOADED @@ -67,7 +67,7 @@ NGCP::Schema::kamailio::Result::mobile_push_registrations =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/ncos_levels.pm b/lib/NGCP/Schema/Result/ncos_levels.pm similarity index 85% rename from lib/NGCP/Schema/billing/Result/ncos_levels.pm rename to lib/NGCP/Schema/Result/ncos_levels.pm index e788c00e..1355b0d0 100644 --- a/lib/NGCP/Schema/billing/Result/ncos_levels.pm +++ b/lib/NGCP/Schema/Result/ncos_levels.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::ncos_levels; +package NGCP::Schema::Result::ncos_levels; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("ncos_levels"); +__PACKAGE__->table("billing.ncos_levels"); __PACKAGE__->add_columns( @@ -57,7 +57,7 @@ __PACKAGE__->add_unique_constraint("reslev_idx", ["reseller_id", "level"]); __PACKAGE__->has_many( "ncos_lnp_lists", - "NGCP::Schema::billing::Result::ncos_lnp_list", + "NGCP::Schema::Result::ncos_lnp_list", { "foreign.ncos_level_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -65,7 +65,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "ncos_pattern_lists", - "NGCP::Schema::billing::Result::ncos_pattern_list", + "NGCP::Schema::Result::ncos_pattern_list", { "foreign.ncos_level_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -73,7 +73,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -92,7 +92,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::ncos_levels +NGCP::Schema::Result::ncos_levels =head1 COMPONENTS LOADED @@ -104,7 +104,7 @@ NGCP::Schema::billing::Result::ncos_levels =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -172,19 +172,19 @@ NGCP::Schema::billing::Result::ncos_levels Type: has_many -Related object: L +Related object: L =head2 ncos_pattern_lists Type: has_many -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/ncos_lnp_list.pm b/lib/NGCP/Schema/Result/ncos_lnp_list.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/ncos_lnp_list.pm rename to lib/NGCP/Schema/Result/ncos_lnp_list.pm index b83876d9..f424ba0c 100644 --- a/lib/NGCP/Schema/billing/Result/ncos_lnp_list.pm +++ b/lib/NGCP/Schema/Result/ncos_lnp_list.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::ncos_lnp_list; +package NGCP::Schema::Result::ncos_lnp_list; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("ncos_lnp_list"); +__PACKAGE__->table("billing.ncos_lnp_list"); __PACKAGE__->add_columns( @@ -53,7 +53,7 @@ __PACKAGE__->add_unique_constraint("levpro_idx", ["ncos_level_id", "lnp_provider __PACKAGE__->belongs_to( "lnp_provider", - "NGCP::Schema::billing::Result::lnp_providers", + "NGCP::Schema::Result::lnp_providers", { id => "lnp_provider_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -61,7 +61,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "ncos_level", - "NGCP::Schema::billing::Result::ncos_levels", + "NGCP::Schema::Result::ncos_levels", { id => "ncos_level_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -75,7 +75,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::ncos_lnp_list +NGCP::Schema::Result::ncos_lnp_list =head1 COMPONENTS LOADED @@ -87,7 +87,7 @@ NGCP::Schema::billing::Result::ncos_lnp_list =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -143,13 +143,13 @@ NGCP::Schema::billing::Result::ncos_lnp_list Type: belongs_to -Related object: L +Related object: L =head2 ncos_level Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/ncos_pattern_list.pm b/lib/NGCP/Schema/Result/ncos_pattern_list.pm similarity index 88% rename from lib/NGCP/Schema/billing/Result/ncos_pattern_list.pm rename to lib/NGCP/Schema/Result/ncos_pattern_list.pm index 4f607a65..e34def67 100644 --- a/lib/NGCP/Schema/billing/Result/ncos_pattern_list.pm +++ b/lib/NGCP/Schema/Result/ncos_pattern_list.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::ncos_pattern_list; +package NGCP::Schema::Result::ncos_pattern_list; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("ncos_pattern_list"); +__PACKAGE__->table("billing.ncos_pattern_list"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->add_unique_constraint("levpat_idx", ["ncos_level_id", "pattern"]); __PACKAGE__->belongs_to( "ncos_level", - "NGCP::Schema::billing::Result::ncos_levels", + "NGCP::Schema::Result::ncos_levels", { id => "ncos_level_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -62,7 +62,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::ncos_pattern_list +NGCP::Schema::Result::ncos_pattern_list =head1 COMPONENTS LOADED @@ -74,7 +74,7 @@ NGCP::Schema::billing::Result::ncos_pattern_list =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -129,7 +129,7 @@ NGCP::Schema::billing::Result::ncos_pattern_list Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/carrier/Result/numbers.pm b/lib/NGCP/Schema/Result/numbers.pm similarity index 86% rename from lib/NGCP/Schema/carrier/Result/numbers.pm rename to lib/NGCP/Schema/Result/numbers.pm index 3e76fa12..7514c421 100644 --- a/lib/NGCP/Schema/carrier/Result/numbers.pm +++ b/lib/NGCP/Schema/Result/numbers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::numbers; +package NGCP::Schema::Result::numbers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("numbers"); +__PACKAGE__->table("carrier.numbers"); __PACKAGE__->add_columns( @@ -36,7 +36,7 @@ __PACKAGE__->set_primary_key("number"); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::carrier::Result::subscribers", + "NGCP::Schema::Result::subscribers", { id => "subscriber_id" }, { is_deferrable => 1, @@ -55,7 +55,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::numbers +NGCP::Schema::Result::numbers =head1 COMPONENTS LOADED @@ -67,7 +67,7 @@ NGCP::Schema::carrier::Result::numbers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -98,7 +98,7 @@ NGCP::Schema::carrier::Result::numbers Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/order_payments.pm b/lib/NGCP/Schema/Result/order_payments.pm similarity index 84% rename from lib/NGCP/Schema/billing/Result/order_payments.pm rename to lib/NGCP/Schema/Result/order_payments.pm index f563283a..570ee468 100644 --- a/lib/NGCP/Schema/billing/Result/order_payments.pm +++ b/lib/NGCP/Schema/Result/order_payments.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::order_payments; +package NGCP::Schema::Result::order_payments; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("order_payments"); +__PACKAGE__->table("billing.order_payments"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "order", - "NGCP::Schema::billing::Result::orders", + "NGCP::Schema::Result::orders", { id => "order_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "payment", - "NGCP::Schema::billing::Result::payments", + "NGCP::Schema::Result::payments", { id => "payment_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::order_payments +NGCP::Schema::Result::order_payments =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::billing::Result::order_payments =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -121,13 +121,13 @@ NGCP::Schema::billing::Result::order_payments Type: belongs_to -Related object: L +Related object: L =head2 payment Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/orders.pm b/lib/NGCP/Schema/Result/orders.pm similarity index 86% rename from lib/NGCP/Schema/billing/Result/orders.pm rename to lib/NGCP/Schema/Result/orders.pm index 4d5fdd08..e698fa00 100644 --- a/lib/NGCP/Schema/billing/Result/orders.pm +++ b/lib/NGCP/Schema/Result/orders.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::orders; +package NGCP::Schema::Result::orders; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("orders"); +__PACKAGE__->table("billing.orders"); __PACKAGE__->add_columns( @@ -96,7 +96,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "contracts", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { "foreign.order_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -104,7 +104,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "customer", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { id => "customer_id" }, { is_deferrable => 1, @@ -117,7 +117,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "delivery_contact", - "NGCP::Schema::billing::Result::contacts", + "NGCP::Schema::Result::contacts", { id => "delivery_contact_id" }, { is_deferrable => 1, @@ -130,7 +130,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "invoice", - "NGCP::Schema::billing::Result::invoices", + "NGCP::Schema::Result::invoices", { id => "invoice_id" }, { is_deferrable => 1, @@ -143,7 +143,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "order_payments", - "NGCP::Schema::billing::Result::order_payments", + "NGCP::Schema::Result::order_payments", { "foreign.order_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -151,7 +151,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -170,7 +170,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::orders +NGCP::Schema::Result::orders =head1 COMPONENTS LOADED @@ -182,7 +182,7 @@ NGCP::Schema::billing::Result::orders =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -279,37 +279,37 @@ NGCP::Schema::billing::Result::orders Type: has_many -Related object: L +Related object: L =head2 customer Type: belongs_to -Related object: L +Related object: L =head2 delivery_contact Type: belongs_to -Related object: L +Related object: L =head2 invoice Type: belongs_to -Related object: L +Related object: L =head2 order_payments Type: has_many -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/sipstats/Result/packets.pm b/lib/NGCP/Schema/Result/packets.pm similarity index 93% rename from lib/NGCP/Schema/sipstats/Result/packets.pm rename to lib/NGCP/Schema/Result/packets.pm index 2b9988cb..c54541ae 100644 --- a/lib/NGCP/Schema/sipstats/Result/packets.pm +++ b/lib/NGCP/Schema/Result/packets.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::sipstats::Result::packets; +package NGCP::Schema::Result::packets; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("packets"); +__PACKAGE__->table("sipstats.packets"); __PACKAGE__->add_columns( @@ -52,7 +52,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::sipstats::Result::packets +NGCP::Schema::Result::packets =head1 COMPONENTS LOADED @@ -64,7 +64,7 @@ NGCP::Schema::sipstats::Result::packets =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/payments.pm b/lib/NGCP/Schema/Result/payments.pm similarity index 90% rename from lib/NGCP/Schema/billing/Result/payments.pm rename to lib/NGCP/Schema/Result/payments.pm index e4e36097..c770fb63 100644 --- a/lib/NGCP/Schema/billing/Result/payments.pm +++ b/lib/NGCP/Schema/Result/payments.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::payments; +package NGCP::Schema::Result::payments; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("payments"); +__PACKAGE__->table("billing.payments"); __PACKAGE__->add_columns( @@ -68,7 +68,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "credit_payments", - "NGCP::Schema::billing::Result::credit_payments", + "NGCP::Schema::Result::credit_payments", { "foreign.payment_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -76,7 +76,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "order_payments", - "NGCP::Schema::billing::Result::order_payments", + "NGCP::Schema::Result::order_payments", { "foreign.payment_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -90,7 +90,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::payments +NGCP::Schema::Result::payments =head1 COMPONENTS LOADED @@ -102,7 +102,7 @@ NGCP::Schema::billing::Result::payments =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -186,13 +186,13 @@ NGCP::Schema::billing::Result::payments Type: has_many -Related object: L +Related object: L =head2 order_payments Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/peer_preferences.pm b/lib/NGCP/Schema/Result/peer_preferences.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/peer_preferences.pm rename to lib/NGCP/Schema/Result/peer_preferences.pm index 06aa8224..a0d884b1 100644 --- a/lib/NGCP/Schema/kamailio/Result/peer_preferences.pm +++ b/lib/NGCP/Schema/Result/peer_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::peer_preferences; +package NGCP::Schema::Result::peer_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("peer_preferences"); +__PACKAGE__->table("kamailio.peer_preferences"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::peer_preferences +NGCP::Schema::Result::peer_preferences =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::peer_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/accounting/Result/prepaid_costs.pm b/lib/NGCP/Schema/Result/prepaid_costs.pm similarity index 92% rename from lib/NGCP/Schema/accounting/Result/prepaid_costs.pm rename to lib/NGCP/Schema/Result/prepaid_costs.pm index a42274d7..abc318bd 100644 --- a/lib/NGCP/Schema/accounting/Result/prepaid_costs.pm +++ b/lib/NGCP/Schema/Result/prepaid_costs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::accounting::Result::prepaid_costs; +package NGCP::Schema::Result::prepaid_costs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("prepaid_costs"); +__PACKAGE__->table("accounting.prepaid_costs"); __PACKAGE__->add_columns( @@ -53,7 +53,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::accounting::Result::prepaid_costs +NGCP::Schema::Result::prepaid_costs =head1 COMPONENTS LOADED @@ -65,7 +65,7 @@ NGCP::Schema::accounting::Result::prepaid_costs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/presentity.pm b/lib/NGCP/Schema/Result/presentity.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/presentity.pm rename to lib/NGCP/Schema/Result/presentity.pm index 4a49a10a..a30b9b5f 100644 --- a/lib/NGCP/Schema/kamailio/Result/presentity.pm +++ b/lib/NGCP/Schema/Result/presentity.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::presentity; +package NGCP::Schema::Result::presentity; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("presentity"); +__PACKAGE__->table("kamailio.presentity"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::presentity +NGCP::Schema::Result::presentity =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::presentity =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/products.pm b/lib/NGCP/Schema/Result/products.pm similarity index 88% rename from lib/NGCP/Schema/billing/Result/products.pm rename to lib/NGCP/Schema/Result/products.pm index ae77d157..3ffe9277 100644 --- a/lib/NGCP/Schema/billing/Result/products.pm +++ b/lib/NGCP/Schema/Result/products.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::products; +package NGCP::Schema::Result::products; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("products"); +__PACKAGE__->table("billing.products"); __PACKAGE__->add_columns( @@ -79,7 +79,7 @@ __PACKAGE__->add_unique_constraint("resnam_idx", ["reseller_id", "name"]); __PACKAGE__->has_many( "billing_mappings", - "NGCP::Schema::billing::Result::billing_mappings", + "NGCP::Schema::Result::billing_mappings", { "foreign.product_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -87,7 +87,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "billing_profile", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { id => "billing_profile_id" }, { is_deferrable => 1, @@ -100,7 +100,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -119,7 +119,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::products +NGCP::Schema::Result::products =head1 COMPONENTS LOADED @@ -131,7 +131,7 @@ NGCP::Schema::billing::Result::products =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -227,19 +227,19 @@ NGCP::Schema::billing::Result::products Type: has_many -Related object: L +Related object: L =head2 billing_profile Type: belongs_to -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_subscribers.pm b/lib/NGCP/Schema/Result/provisioning_voip_subscribers.pm similarity index 77% rename from lib/NGCP/Schema/provisioning/Result/voip_subscribers.pm rename to lib/NGCP/Schema/Result/provisioning_voip_subscribers.pm index 8999973d..319591f0 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_subscribers.pm +++ b/lib/NGCP/Schema/Result/provisioning_voip_subscribers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_subscribers; +package NGCP::Schema::Result::provisioning_voip_subscribers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_subscribers"); +__PACKAGE__->table("provisioning.voip_subscribers"); __PACKAGE__->add_columns( @@ -82,7 +82,7 @@ __PACKAGE__->add_unique_constraint("webuser_dom_idx", ["webusername", "domain_id __PACKAGE__->belongs_to( "domain", - "NGCP::Schema::provisioning::Result::voip_domains", + "NGCP::Schema::Result::voip_domains", { id => "domain_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -90,7 +90,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_cc_mappings", - "NGCP::Schema::provisioning::Result::voip_cc_mappings", + "NGCP::Schema::Result::voip_cc_mappings", { "foreign.uuid" => "self.uuid" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -98,7 +98,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_cf_destination_sets", - "NGCP::Schema::provisioning::Result::voip_cf_destination_sets", + "NGCP::Schema::Result::voip_cf_destination_sets", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -106,7 +106,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_cf_mappings", - "NGCP::Schema::provisioning::Result::voip_cf_mappings", + "NGCP::Schema::Result::voip_cf_mappings", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -114,7 +114,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_cf_time_sets", - "NGCP::Schema::provisioning::Result::voip_cf_time_sets", + "NGCP::Schema::Result::voip_cf_time_sets", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -122,7 +122,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_contacts", - "NGCP::Schema::provisioning::Result::voip_contacts", + "NGCP::Schema::Result::voip_contacts", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -130,7 +130,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_dbaliases", - "NGCP::Schema::provisioning::Result::voip_dbaliases", + "NGCP::Schema::Result::voip_dbaliases", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -138,7 +138,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_fax_destinations", - "NGCP::Schema::provisioning::Result::voip_fax_destinations", + "NGCP::Schema::Result::voip_fax_destinations", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -146,7 +146,7 @@ __PACKAGE__->has_many( __PACKAGE__->might_have( "voip_fax_preference", - "NGCP::Schema::provisioning::Result::voip_fax_preferences", + "NGCP::Schema::Result::voip_fax_preferences", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -154,7 +154,7 @@ __PACKAGE__->might_have( __PACKAGE__->might_have( "voip_reminder", - "NGCP::Schema::provisioning::Result::voip_reminder", + "NGCP::Schema::Result::voip_reminder", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -162,7 +162,7 @@ __PACKAGE__->might_have( __PACKAGE__->has_many( "voip_speed_dials", - "NGCP::Schema::provisioning::Result::voip_speed_dial", + "NGCP::Schema::Result::voip_speed_dial", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -170,7 +170,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_trusted_sources", - "NGCP::Schema::provisioning::Result::voip_trusted_sources", + "NGCP::Schema::Result::voip_trusted_sources", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -178,7 +178,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_usr_preferences", - "NGCP::Schema::provisioning::Result::voip_usr_preferences", + "NGCP::Schema::Result::voip_usr_preferences", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -192,7 +192,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_subscribers +NGCP::Schema::Result::provisioning_voip_subscribers =head1 COMPONENTS LOADED @@ -204,7 +204,7 @@ NGCP::Schema::provisioning::Result::voip_subscribers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -334,79 +334,79 @@ NGCP::Schema::provisioning::Result::voip_subscribers Type: belongs_to -Related object: L +Related object: L =head2 voip_cc_mappings Type: has_many -Related object: L +Related object: L =head2 voip_cf_destination_sets Type: has_many -Related object: L +Related object: L =head2 voip_cf_mappings Type: has_many -Related object: L +Related object: L =head2 voip_cf_time_sets Type: has_many -Related object: L +Related object: L =head2 voip_contacts Type: has_many -Related object: L +Related object: L =head2 voip_dbaliases Type: has_many -Related object: L +Related object: L =head2 voip_fax_destinations Type: has_many -Related object: L +Related object: L =head2 voip_fax_preference Type: might_have -Related object: L +Related object: L =head2 voip_reminder Type: might_have -Related object: L +Related object: L =head2 voip_speed_dials Type: has_many -Related object: L +Related object: L =head2 voip_trusted_sources Type: has_many -Related object: L +Related object: L =head2 voip_usr_preferences Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/pua.pm b/lib/NGCP/Schema/Result/pua.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/pua.pm rename to lib/NGCP/Schema/Result/pua.pm index 2284d575..d210fb9b 100644 --- a/lib/NGCP/Schema/kamailio/Result/pua.pm +++ b/lib/NGCP/Schema/Result/pua.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::pua; +package NGCP::Schema::Result::pua; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("pua"); +__PACKAGE__->table("kamailio.pua"); __PACKAGE__->add_columns( @@ -79,7 +79,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::pua +NGCP::Schema::Result::pua =head1 COMPONENTS LOADED @@ -91,7 +91,7 @@ NGCP::Schema::kamailio::Result::pua =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/billing/Result/resellers.pm b/lib/NGCP/Schema/Result/resellers.pm similarity index 74% rename from lib/NGCP/Schema/billing/Result/resellers.pm rename to lib/NGCP/Schema/Result/resellers.pm index c615ed46..faf6f096 100644 --- a/lib/NGCP/Schema/billing/Result/resellers.pm +++ b/lib/NGCP/Schema/Result/resellers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::resellers; +package NGCP::Schema::Result::resellers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("resellers"); +__PACKAGE__->table("billing.resellers"); __PACKAGE__->add_columns( @@ -56,7 +56,7 @@ __PACKAGE__->add_unique_constraint("name_idx", ["name"]); __PACKAGE__->has_many( "admins", - "NGCP::Schema::billing::Result::admins", + "NGCP::Schema::Result::admins", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -64,7 +64,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "billing_profiles", - "NGCP::Schema::billing::Result::billing_profiles", + "NGCP::Schema::Result::billing_profiles", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -72,7 +72,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -80,7 +80,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "contracts", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -88,7 +88,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "customers", - "NGCP::Schema::billing::Result::customers", + "NGCP::Schema::Result::customers", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -96,7 +96,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "domain_resellers", - "NGCP::Schema::billing::Result::domain_resellers", + "NGCP::Schema::Result::domain_resellers", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -104,7 +104,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "ncos_levels", - "NGCP::Schema::billing::Result::ncos_levels", + "NGCP::Schema::Result::ncos_levels", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -112,7 +112,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "orders", - "NGCP::Schema::billing::Result::orders", + "NGCP::Schema::Result::orders", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -120,7 +120,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "products", - "NGCP::Schema::billing::Result::products", + "NGCP::Schema::Result::products", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -128,7 +128,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_intercepts", - "NGCP::Schema::billing::Result::voip_intercept", + "NGCP::Schema::Result::voip_intercept", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -136,7 +136,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_number_block_resellers", - "NGCP::Schema::billing::Result::voip_number_block_resellers", + "NGCP::Schema::Result::voip_number_block_resellers", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -144,7 +144,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_numbers", - "NGCP::Schema::billing::Result::voip_numbers", + "NGCP::Schema::Result::voip_numbers", { "foreign.reseller_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -158,7 +158,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::resellers +NGCP::Schema::Result::resellers =head1 COMPONENTS LOADED @@ -170,7 +170,7 @@ NGCP::Schema::billing::Result::resellers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -233,73 +233,73 @@ NGCP::Schema::billing::Result::resellers Type: has_many -Related object: L +Related object: L =head2 billing_profiles Type: has_many -Related object: L +Related object: L =head2 contract Type: belongs_to -Related object: L +Related object: L =head2 contracts Type: has_many -Related object: L +Related object: L =head2 customers Type: has_many -Related object: L +Related object: L =head2 domain_resellers Type: has_many -Related object: L +Related object: L =head2 ncos_levels Type: has_many -Related object: L +Related object: L =head2 orders Type: has_many -Related object: L +Related object: L =head2 products Type: has_many -Related object: L +Related object: L =head2 voip_intercepts Type: has_many -Related object: L +Related object: L =head2 voip_number_block_resellers Type: has_many -Related object: L +Related object: L =head2 voip_numbers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/rls_presentity.pm b/lib/NGCP/Schema/Result/rls_presentity.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/rls_presentity.pm rename to lib/NGCP/Schema/Result/rls_presentity.pm index d496a701..d7bd3182 100644 --- a/lib/NGCP/Schema/kamailio/Result/rls_presentity.pm +++ b/lib/NGCP/Schema/Result/rls_presentity.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::rls_presentity; +package NGCP::Schema::Result::rls_presentity; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("rls_presentity"); +__PACKAGE__->table("kamailio.rls_presentity"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::rls_presentity +NGCP::Schema::Result::rls_presentity =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::rls_presentity =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/rls_watchers.pm b/lib/NGCP/Schema/Result/rls_watchers.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/rls_watchers.pm rename to lib/NGCP/Schema/Result/rls_watchers.pm index fbf93a49..ff926006 100644 --- a/lib/NGCP/Schema/kamailio/Result/rls_watchers.pm +++ b/lib/NGCP/Schema/Result/rls_watchers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::rls_watchers; +package NGCP::Schema::Result::rls_watchers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("rls_watchers"); +__PACKAGE__->table("kamailio.rls_watchers"); __PACKAGE__->add_columns( @@ -94,7 +94,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::rls_watchers +NGCP::Schema::Result::rls_watchers =head1 COMPONENTS LOADED @@ -106,7 +106,7 @@ NGCP::Schema::kamailio::Result::rls_watchers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/sca_subscriptions.pm b/lib/NGCP/Schema/Result/sca_subscriptions.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/sca_subscriptions.pm rename to lib/NGCP/Schema/Result/sca_subscriptions.pm index e0b07531..333fe464 100644 --- a/lib/NGCP/Schema/kamailio/Result/sca_subscriptions.pm +++ b/lib/NGCP/Schema/Result/sca_subscriptions.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::sca_subscriptions; +package NGCP::Schema::Result::sca_subscriptions; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("sca_subscriptions"); +__PACKAGE__->table("kamailio.sca_subscriptions"); __PACKAGE__->add_columns( @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::sca_subscriptions +NGCP::Schema::Result::sca_subscriptions =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::kamailio::Result::sca_subscriptions =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/sems_registrations.pm b/lib/NGCP/Schema/Result/sems_registrations.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/sems_registrations.pm rename to lib/NGCP/Schema/Result/sems_registrations.pm index 09ecc024..acb47e4d 100644 --- a/lib/NGCP/Schema/kamailio/Result/sems_registrations.pm +++ b/lib/NGCP/Schema/Result/sems_registrations.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::sems_registrations; +package NGCP::Schema::Result::sems_registrations; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("sems_registrations"); +__PACKAGE__->table("kamailio.sems_registrations"); __PACKAGE__->add_columns( @@ -55,7 +55,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::sems_registrations +NGCP::Schema::Result::sems_registrations =head1 COMPONENTS LOADED @@ -67,7 +67,7 @@ NGCP::Schema::kamailio::Result::sems_registrations =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/silo.pm b/lib/NGCP/Schema/Result/silo.pm similarity index 96% rename from lib/NGCP/Schema/kamailio/Result/silo.pm rename to lib/NGCP/Schema/Result/silo.pm index 7a5f3907..c3d46236 100644 --- a/lib/NGCP/Schema/kamailio/Result/silo.pm +++ b/lib/NGCP/Schema/Result/silo.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::silo; +package NGCP::Schema::Result::silo; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("silo"); +__PACKAGE__->table("kamailio.silo"); __PACKAGE__->add_columns( @@ -69,7 +69,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::silo +NGCP::Schema::Result::silo =head1 COMPONENTS LOADED @@ -81,7 +81,7 @@ NGCP::Schema::kamailio::Result::silo =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/sipstats/Result/mark.pm b/lib/NGCP/Schema/Result/sipstats_mark.pm similarity index 90% rename from lib/NGCP/Schema/sipstats/Result/mark.pm rename to lib/NGCP/Schema/Result/sipstats_mark.pm index 167bbd7c..70165b68 100644 --- a/lib/NGCP/Schema/sipstats/Result/mark.pm +++ b/lib/NGCP/Schema/Result/sipstats_mark.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::sipstats::Result::mark; +package NGCP::Schema::Result::sipstats_mark; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("mark"); +__PACKAGE__->table("sipstats.mark"); __PACKAGE__->add_columns( @@ -37,7 +37,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::sipstats::Result::mark +NGCP::Schema::Result::sipstats_mark =head1 COMPONENTS LOADED @@ -49,7 +49,7 @@ NGCP::Schema::sipstats::Result::mark =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/speed_dial.pm b/lib/NGCP/Schema/Result/speed_dial.pm similarity index 95% rename from lib/NGCP/Schema/kamailio/Result/speed_dial.pm rename to lib/NGCP/Schema/Result/speed_dial.pm index f8cccce9..c704b6b9 100644 --- a/lib/NGCP/Schema/kamailio/Result/speed_dial.pm +++ b/lib/NGCP/Schema/Result/speed_dial.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::speed_dial; +package NGCP::Schema::Result::speed_dial; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("speed_dial"); +__PACKAGE__->table("kamailio.speed_dial"); __PACKAGE__->add_columns( @@ -62,7 +62,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::speed_dial +NGCP::Schema::Result::speed_dial =head1 COMPONENTS LOADED @@ -74,7 +74,7 @@ NGCP::Schema::kamailio::Result::speed_dial =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/sipstats/Result/statistics.pm b/lib/NGCP/Schema/Result/statistics.pm similarity index 98% rename from lib/NGCP/Schema/sipstats/Result/statistics.pm rename to lib/NGCP/Schema/Result/statistics.pm index 16f9673f..c9ea1661 100644 --- a/lib/NGCP/Schema/sipstats/Result/statistics.pm +++ b/lib/NGCP/Schema/Result/statistics.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::sipstats::Result::statistics; +package NGCP::Schema::Result::statistics; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("statistics"); +__PACKAGE__->table("sipstats.statistics"); __PACKAGE__->add_columns( @@ -245,7 +245,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::sipstats::Result::statistics +NGCP::Schema::Result::statistics =head1 COMPONENTS LOADED @@ -257,7 +257,7 @@ NGCP::Schema::sipstats::Result::statistics =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/subscriber.pm b/lib/NGCP/Schema/Result/subscriber.pm similarity index 95% rename from lib/NGCP/Schema/kamailio/Result/subscriber.pm rename to lib/NGCP/Schema/Result/subscriber.pm index 29eb1ba9..1428c713 100644 --- a/lib/NGCP/Schema/kamailio/Result/subscriber.pm +++ b/lib/NGCP/Schema/Result/subscriber.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::subscriber; +package NGCP::Schema::Result::subscriber; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("subscriber"); +__PACKAGE__->table("kamailio.subscriber"); __PACKAGE__->add_columns( @@ -68,7 +68,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::subscriber +NGCP::Schema::Result::subscriber =head1 COMPONENTS LOADED @@ -80,7 +80,7 @@ NGCP::Schema::kamailio::Result::subscriber =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/carrier/Result/subscribers.pm b/lib/NGCP/Schema/Result/subscribers.pm similarity index 88% rename from lib/NGCP/Schema/carrier/Result/subscribers.pm rename to lib/NGCP/Schema/Result/subscribers.pm index f3e6b9c8..88ad3db8 100644 --- a/lib/NGCP/Schema/carrier/Result/subscribers.pm +++ b/lib/NGCP/Schema/Result/subscribers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::carrier::Result::subscribers; +package NGCP::Schema::Result::subscribers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("subscribers"); +__PACKAGE__->table("carrier.subscribers"); __PACKAGE__->add_columns( @@ -58,7 +58,7 @@ __PACKAGE__->add_unique_constraint("usrdom_idx", ["username", "domain"]); __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::carrier::Result::contracts", + "NGCP::Schema::Result::carrier_contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -66,7 +66,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "numbers", - "NGCP::Schema::carrier::Result::numbers", + "NGCP::Schema::Result::numbers", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -80,7 +80,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::carrier::Result::subscribers +NGCP::Schema::Result::subscribers =head1 COMPONENTS LOADED @@ -92,7 +92,7 @@ NGCP::Schema::carrier::Result::subscribers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -178,13 +178,13 @@ NGCP::Schema::carrier::Result::subscribers Type: belongs_to -Related object: L +Related object: L =head2 numbers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/trusted.pm b/lib/NGCP/Schema/Result/trusted.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/trusted.pm rename to lib/NGCP/Schema/Result/trusted.pm index 358a58c4..12a6dd31 100644 --- a/lib/NGCP/Schema/kamailio/Result/trusted.pm +++ b/lib/NGCP/Schema/Result/trusted.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::trusted; +package NGCP::Schema::Result::trusted; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("trusted"); +__PACKAGE__->table("kamailio.trusted"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::trusted +NGCP::Schema::Result::trusted =head1 COMPONENTS LOADED @@ -60,7 +60,7 @@ NGCP::Schema::kamailio::Result::trusted =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_credentials.pm b/lib/NGCP/Schema/Result/uid_credentials.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/uid_credentials.pm rename to lib/NGCP/Schema/Result/uid_credentials.pm index 02fe459b..d9863e90 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_credentials.pm +++ b/lib/NGCP/Schema/Result/uid_credentials.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_credentials; +package NGCP::Schema::Result::uid_credentials; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_credentials"); +__PACKAGE__->table("kamailio.uid_credentials"); __PACKAGE__->add_columns( @@ -61,7 +61,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_credentials +NGCP::Schema::Result::uid_credentials =head1 COMPONENTS LOADED @@ -73,7 +73,7 @@ NGCP::Schema::kamailio::Result::uid_credentials =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_domain.pm b/lib/NGCP/Schema/Result/uid_domain.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/uid_domain.pm rename to lib/NGCP/Schema/Result/uid_domain.pm index 4ee86516..94bb3521 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_domain.pm +++ b/lib/NGCP/Schema/Result/uid_domain.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_domain; +package NGCP::Schema::Result::uid_domain; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_domain"); +__PACKAGE__->table("kamailio.uid_domain"); __PACKAGE__->add_columns( @@ -54,7 +54,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_domain +NGCP::Schema::Result::uid_domain =head1 COMPONENTS LOADED @@ -66,7 +66,7 @@ NGCP::Schema::kamailio::Result::uid_domain =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_domain_attrs.pm b/lib/NGCP/Schema/Result/uid_domain_attrs.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/uid_domain_attrs.pm rename to lib/NGCP/Schema/Result/uid_domain_attrs.pm index bc122b5f..adb7dd22 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_domain_attrs.pm +++ b/lib/NGCP/Schema/Result/uid_domain_attrs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_domain_attrs; +package NGCP::Schema::Result::uid_domain_attrs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_domain_attrs"); +__PACKAGE__->table("kamailio.uid_domain_attrs"); __PACKAGE__->add_columns( @@ -58,7 +58,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_domain_attrs +NGCP::Schema::Result::uid_domain_attrs =head1 COMPONENTS LOADED @@ -70,7 +70,7 @@ NGCP::Schema::kamailio::Result::uid_domain_attrs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_global_attrs.pm b/lib/NGCP/Schema/Result/uid_global_attrs.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/uid_global_attrs.pm rename to lib/NGCP/Schema/Result/uid_global_attrs.pm index 057f0ff7..35e4e361 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_global_attrs.pm +++ b/lib/NGCP/Schema/Result/uid_global_attrs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_global_attrs; +package NGCP::Schema::Result::uid_global_attrs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_global_attrs"); +__PACKAGE__->table("kamailio.uid_global_attrs"); __PACKAGE__->add_columns( @@ -56,7 +56,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_global_attrs +NGCP::Schema::Result::uid_global_attrs =head1 COMPONENTS LOADED @@ -68,7 +68,7 @@ NGCP::Schema::kamailio::Result::uid_global_attrs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_uri.pm b/lib/NGCP/Schema/Result/uid_uri.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/uid_uri.pm rename to lib/NGCP/Schema/Result/uid_uri.pm index aa6c0e0a..562a95fa 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_uri.pm +++ b/lib/NGCP/Schema/Result/uid_uri.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_uri; +package NGCP::Schema::Result::uid_uri; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_uri"); +__PACKAGE__->table("kamailio.uid_uri"); __PACKAGE__->add_columns( @@ -55,7 +55,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_uri +NGCP::Schema::Result::uid_uri =head1 COMPONENTS LOADED @@ -67,7 +67,7 @@ NGCP::Schema::kamailio::Result::uid_uri =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_uri_attrs.pm b/lib/NGCP/Schema/Result/uid_uri_attrs.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/uid_uri_attrs.pm rename to lib/NGCP/Schema/Result/uid_uri_attrs.pm index 896ef811..bc7a1e01 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_uri_attrs.pm +++ b/lib/NGCP/Schema/Result/uid_uri_attrs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_uri_attrs; +package NGCP::Schema::Result::uid_uri_attrs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_uri_attrs"); +__PACKAGE__->table("kamailio.uid_uri_attrs"); __PACKAGE__->add_columns( @@ -65,7 +65,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_uri_attrs +NGCP::Schema::Result::uid_uri_attrs =head1 COMPONENTS LOADED @@ -77,7 +77,7 @@ NGCP::Schema::kamailio::Result::uid_uri_attrs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/uid_user_attrs.pm b/lib/NGCP/Schema/Result/uid_user_attrs.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/uid_user_attrs.pm rename to lib/NGCP/Schema/Result/uid_user_attrs.pm index 614b7e80..7061338d 100644 --- a/lib/NGCP/Schema/kamailio/Result/uid_user_attrs.pm +++ b/lib/NGCP/Schema/Result/uid_user_attrs.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::uid_user_attrs; +package NGCP::Schema::Result::uid_user_attrs; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("uid_user_attrs"); +__PACKAGE__->table("kamailio.uid_user_attrs"); __PACKAGE__->add_columns( @@ -58,7 +58,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::uid_user_attrs +NGCP::Schema::Result::uid_user_attrs =head1 COMPONENTS LOADED @@ -70,7 +70,7 @@ NGCP::Schema::kamailio::Result::uid_user_attrs =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/usr_preferences.pm b/lib/NGCP/Schema/Result/usr_preferences.pm similarity index 93% rename from lib/NGCP/Schema/kamailio/Result/usr_preferences.pm rename to lib/NGCP/Schema/Result/usr_preferences.pm index 7f9d8a66..3145cf22 100644 --- a/lib/NGCP/Schema/kamailio/Result/usr_preferences.pm +++ b/lib/NGCP/Schema/Result/usr_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::usr_preferences; +package NGCP::Schema::Result::usr_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("usr_preferences"); +__PACKAGE__->table("kamailio.usr_preferences"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::usr_preferences +NGCP::Schema::Result::usr_preferences =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::usr_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/version.pm b/lib/NGCP/Schema/Result/version.pm similarity index 91% rename from lib/NGCP/Schema/kamailio/Result/version.pm rename to lib/NGCP/Schema/Result/version.pm index 0fe63a57..7f2799a1 100644 --- a/lib/NGCP/Schema/kamailio/Result/version.pm +++ b/lib/NGCP/Schema/Result/version.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::version; +package NGCP::Schema::Result::version; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("version"); +__PACKAGE__->table("kamailio.version"); __PACKAGE__->add_columns( @@ -42,7 +42,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::version +NGCP::Schema::Result::version =head1 COMPONENTS LOADED @@ -54,7 +54,7 @@ NGCP::Schema::kamailio::Result::version =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/voicemail_spool.pm b/lib/NGCP/Schema/Result/voicemail_spool.pm similarity index 92% rename from lib/NGCP/Schema/kamailio/Result/voicemail_spool.pm rename to lib/NGCP/Schema/Result/voicemail_spool.pm index 4c1e4a50..634a833a 100644 --- a/lib/NGCP/Schema/kamailio/Result/voicemail_spool.pm +++ b/lib/NGCP/Schema/Result/voicemail_spool.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::voicemail_spool; +package NGCP::Schema::Result::voicemail_spool; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voicemail_spool"); +__PACKAGE__->table("kamailio.voicemail_spool"); __PACKAGE__->add_columns( @@ -60,7 +60,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "mailboxuser", - "NGCP::Schema::kamailio::Result::voicemail_users", + "NGCP::Schema::Result::voicemail_users", { customer_id => "mailboxuser" }, { is_deferrable => 1, @@ -79,7 +79,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::voicemail_spool +NGCP::Schema::Result::voicemail_spool =head1 COMPONENTS LOADED @@ -91,7 +91,7 @@ NGCP::Schema::kamailio::Result::voicemail_spool =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -184,7 +184,7 @@ NGCP::Schema::kamailio::Result::voicemail_spool Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/voicemail_users.pm b/lib/NGCP/Schema/Result/voicemail_users.pm similarity index 95% rename from lib/NGCP/Schema/kamailio/Result/voicemail_users.pm rename to lib/NGCP/Schema/Result/voicemail_users.pm index bda95299..57667b89 100644 --- a/lib/NGCP/Schema/kamailio/Result/voicemail_users.pm +++ b/lib/NGCP/Schema/Result/voicemail_users.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::voicemail_users; +package NGCP::Schema::Result::voicemail_users; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voicemail_users"); +__PACKAGE__->table("kamailio.voicemail_users"); __PACKAGE__->add_columns( @@ -103,7 +103,7 @@ __PACKAGE__->set_primary_key("uniqueid"); __PACKAGE__->has_many( "voicemail_spools", - "NGCP::Schema::kamailio::Result::voicemail_spool", + "NGCP::Schema::Result::voicemail_spool", { "foreign.mailboxuser" => "self.customer_id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -117,7 +117,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::voicemail_users +NGCP::Schema::Result::voicemail_users =head1 COMPONENTS LOADED @@ -129,7 +129,7 @@ NGCP::Schema::kamailio::Result::voicemail_users =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -321,7 +321,7 @@ NGCP::Schema::kamailio::Result::voicemail_users Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_aig_sequence.pm b/lib/NGCP/Schema/Result/voip_aig_sequence.pm similarity index 86% rename from lib/NGCP/Schema/provisioning/Result/voip_aig_sequence.pm rename to lib/NGCP/Schema/Result/voip_aig_sequence.pm index 787a109c..4c79b80c 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_aig_sequence.pm +++ b/lib/NGCP/Schema/Result/voip_aig_sequence.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_aig_sequence; +package NGCP::Schema::Result::voip_aig_sequence; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_aig_sequence"); +__PACKAGE__->table("provisioning.voip_aig_sequence"); __PACKAGE__->add_columns( @@ -40,7 +40,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_aig_sequence +NGCP::Schema::Result::voip_aig_sequence =head1 COMPONENTS LOADED @@ -52,7 +52,7 @@ NGCP::Schema::provisioning::Result::voip_aig_sequence =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/provisioning/Result/voip_allowed_ip_groups.pm b/lib/NGCP/Schema/Result/voip_allowed_ip_groups.pm similarity index 89% rename from lib/NGCP/Schema/provisioning/Result/voip_allowed_ip_groups.pm rename to lib/NGCP/Schema/Result/voip_allowed_ip_groups.pm index b660ac46..f2d825d9 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_allowed_ip_groups.pm +++ b/lib/NGCP/Schema/Result/voip_allowed_ip_groups.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_allowed_ip_groups; +package NGCP::Schema::Result::voip_allowed_ip_groups; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_allowed_ip_groups"); +__PACKAGE__->table("provisioning.voip_allowed_ip_groups"); __PACKAGE__->add_columns( @@ -47,7 +47,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_allowed_ip_groups +NGCP::Schema::Result::voip_allowed_ip_groups =head1 COMPONENTS LOADED @@ -59,7 +59,7 @@ NGCP::Schema::provisioning::Result::voip_allowed_ip_groups =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/provisioning/Result/voip_cc_mappings.pm b/lib/NGCP/Schema/Result/voip_cc_mappings.pm similarity index 85% rename from lib/NGCP/Schema/provisioning/Result/voip_cc_mappings.pm rename to lib/NGCP/Schema/Result/voip_cc_mappings.pm index 1d271673..e04205ab 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_cc_mappings.pm +++ b/lib/NGCP/Schema/Result/voip_cc_mappings.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_cc_mappings; +package NGCP::Schema::Result::voip_cc_mappings; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_cc_mappings"); +__PACKAGE__->table("provisioning.voip_cc_mappings"); __PACKAGE__->add_columns( @@ -40,7 +40,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "uuid", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { uuid => "uuid" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -54,7 +54,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_cc_mappings +NGCP::Schema::Result::voip_cc_mappings =head1 COMPONENTS LOADED @@ -66,7 +66,7 @@ NGCP::Schema::provisioning::Result::voip_cc_mappings =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -110,7 +110,7 @@ NGCP::Schema::provisioning::Result::voip_cc_mappings Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_cf_destination_sets.pm b/lib/NGCP/Schema/Result/voip_cf_destination_sets.pm similarity index 78% rename from lib/NGCP/Schema/provisioning/Result/voip_cf_destination_sets.pm rename to lib/NGCP/Schema/Result/voip_cf_destination_sets.pm index 4df985d5..30899e34 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_cf_destination_sets.pm +++ b/lib/NGCP/Schema/Result/voip_cf_destination_sets.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_cf_destination_sets; +package NGCP::Schema::Result::voip_cf_destination_sets; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_cf_destination_sets"); +__PACKAGE__->table("provisioning.voip_cf_destination_sets"); __PACKAGE__->add_columns( @@ -43,7 +43,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_cf_destinations", - "NGCP::Schema::provisioning::Result::voip_cf_destinations", + "NGCP::Schema::Result::voip_cf_destinations", { "foreign.destination_set_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -64,7 +64,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_cf_mappings", - "NGCP::Schema::provisioning::Result::voip_cf_mappings", + "NGCP::Schema::Result::voip_cf_mappings", { "foreign.destination_set_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -78,7 +78,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_cf_destination_sets +NGCP::Schema::Result::voip_cf_destination_sets =head1 COMPONENTS LOADED @@ -90,7 +90,7 @@ NGCP::Schema::provisioning::Result::voip_cf_destination_sets =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -128,19 +128,19 @@ NGCP::Schema::provisioning::Result::voip_cf_destination_sets Type: belongs_to -Related object: L +Related object: L =head2 voip_cf_destinations Type: has_many -Related object: L +Related object: L =head2 voip_cf_mappings Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_cf_destinations.pm b/lib/NGCP/Schema/Result/voip_cf_destinations.pm similarity index 86% rename from lib/NGCP/Schema/provisioning/Result/voip_cf_destinations.pm rename to lib/NGCP/Schema/Result/voip_cf_destinations.pm index 14b1e18f..dc408c97 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_cf_destinations.pm +++ b/lib/NGCP/Schema/Result/voip_cf_destinations.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_cf_destinations; +package NGCP::Schema::Result::voip_cf_destinations; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_cf_destinations"); +__PACKAGE__->table("provisioning.voip_cf_destinations"); __PACKAGE__->add_columns( @@ -52,7 +52,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "destination_set", - "NGCP::Schema::provisioning::Result::voip_cf_destination_sets", + "NGCP::Schema::Result::voip_cf_destination_sets", { id => "destination_set_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -66,7 +66,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_cf_destinations +NGCP::Schema::Result::voip_cf_destinations =head1 COMPONENTS LOADED @@ -78,7 +78,7 @@ NGCP::Schema::provisioning::Result::voip_cf_destinations =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -129,7 +129,7 @@ NGCP::Schema::provisioning::Result::voip_cf_destinations Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_cf_mappings.pm b/lib/NGCP/Schema/Result/voip_cf_mappings.pm similarity index 83% rename from lib/NGCP/Schema/provisioning/Result/voip_cf_mappings.pm rename to lib/NGCP/Schema/Result/voip_cf_mappings.pm index d32d360b..69517cd7 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_cf_mappings.pm +++ b/lib/NGCP/Schema/Result/voip_cf_mappings.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_cf_mappings; +package NGCP::Schema::Result::voip_cf_mappings; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_cf_mappings"); +__PACKAGE__->table("provisioning.voip_cf_mappings"); __PACKAGE__->add_columns( @@ -62,7 +62,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "destination_set", - "NGCP::Schema::provisioning::Result::voip_cf_destination_sets", + "NGCP::Schema::Result::voip_cf_destination_sets", { id => "destination_set_id" }, { is_deferrable => 1, @@ -75,7 +75,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -83,7 +83,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "time_set", - "NGCP::Schema::provisioning::Result::voip_cf_time_sets", + "NGCP::Schema::Result::voip_cf_time_sets", { id => "time_set_id" }, { is_deferrable => 1, @@ -102,7 +102,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_cf_mappings +NGCP::Schema::Result::voip_cf_mappings =head1 COMPONENTS LOADED @@ -114,7 +114,7 @@ NGCP::Schema::provisioning::Result::voip_cf_mappings =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -167,19 +167,19 @@ NGCP::Schema::provisioning::Result::voip_cf_mappings Type: belongs_to -Related object: L +Related object: L =head2 subscriber Type: belongs_to -Related object: L +Related object: L =head2 time_set Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_cf_periods.pm b/lib/NGCP/Schema/Result/voip_cf_periods.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/voip_cf_periods.pm rename to lib/NGCP/Schema/Result/voip_cf_periods.pm index 9fc5099a..f26a5ba8 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_cf_periods.pm +++ b/lib/NGCP/Schema/Result/voip_cf_periods.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_cf_periods; +package NGCP::Schema::Result::voip_cf_periods; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_cf_periods"); +__PACKAGE__->table("provisioning.voip_cf_periods"); __PACKAGE__->add_columns( @@ -53,7 +53,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "time_set", - "NGCP::Schema::provisioning::Result::voip_cf_time_sets", + "NGCP::Schema::Result::voip_cf_time_sets", { id => "time_set_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_cf_periods +NGCP::Schema::Result::voip_cf_periods =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::provisioning::Result::voip_cf_periods =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -147,7 +147,7 @@ NGCP::Schema::provisioning::Result::voip_cf_periods Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_cf_time_sets.pm b/lib/NGCP/Schema/Result/voip_cf_time_sets.pm similarity index 79% rename from lib/NGCP/Schema/provisioning/Result/voip_cf_time_sets.pm rename to lib/NGCP/Schema/Result/voip_cf_time_sets.pm index 29ed766b..cd8c2d04 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_cf_time_sets.pm +++ b/lib/NGCP/Schema/Result/voip_cf_time_sets.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_cf_time_sets; +package NGCP::Schema::Result::voip_cf_time_sets; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_cf_time_sets"); +__PACKAGE__->table("provisioning.voip_cf_time_sets"); __PACKAGE__->add_columns( @@ -43,7 +43,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_cf_mappings", - "NGCP::Schema::provisioning::Result::voip_cf_mappings", + "NGCP::Schema::Result::voip_cf_mappings", { "foreign.time_set_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -64,7 +64,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_cf_periods", - "NGCP::Schema::provisioning::Result::voip_cf_periods", + "NGCP::Schema::Result::voip_cf_periods", { "foreign.time_set_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -78,7 +78,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_cf_time_sets +NGCP::Schema::Result::voip_cf_time_sets =head1 COMPONENTS LOADED @@ -90,7 +90,7 @@ NGCP::Schema::provisioning::Result::voip_cf_time_sets =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -128,19 +128,19 @@ NGCP::Schema::provisioning::Result::voip_cf_time_sets Type: belongs_to -Related object: L +Related object: L =head2 voip_cf_mappings Type: has_many -Related object: L +Related object: L =head2 voip_cf_periods Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_contacts.pm b/lib/NGCP/Schema/Result/voip_contacts.pm similarity index 90% rename from lib/NGCP/Schema/provisioning/Result/voip_contacts.pm rename to lib/NGCP/Schema/Result/voip_contacts.pm index 5a533253..c643f4e4 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_contacts.pm +++ b/lib/NGCP/Schema/Result/voip_contacts.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_contacts; +package NGCP::Schema::Result::voip_contacts; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_contacts"); +__PACKAGE__->table("provisioning.voip_contacts"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -73,7 +73,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_contacts +NGCP::Schema::Result::voip_contacts =head1 COMPONENTS LOADED @@ -85,7 +85,7 @@ NGCP::Schema::provisioning::Result::voip_contacts =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -171,7 +171,7 @@ NGCP::Schema::provisioning::Result::voip_contacts Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_dbaliases.pm b/lib/NGCP/Schema/Result/voip_dbaliases.pm similarity index 85% rename from lib/NGCP/Schema/provisioning/Result/voip_dbaliases.pm rename to lib/NGCP/Schema/Result/voip_dbaliases.pm index 1d0015b2..1b88ce1d 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_dbaliases.pm +++ b/lib/NGCP/Schema/Result/voip_dbaliases.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_dbaliases; +package NGCP::Schema::Result::voip_dbaliases; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_dbaliases"); +__PACKAGE__->table("provisioning.voip_dbaliases"); __PACKAGE__->add_columns( @@ -53,7 +53,7 @@ __PACKAGE__->add_unique_constraint("user_dom_idx", ["username", "domain_id"]); __PACKAGE__->belongs_to( "domain", - "NGCP::Schema::provisioning::Result::voip_domains", + "NGCP::Schema::Result::voip_domains", { id => "domain_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -61,7 +61,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -75,7 +75,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_dbaliases +NGCP::Schema::Result::voip_dbaliases =head1 COMPONENTS LOADED @@ -87,7 +87,7 @@ NGCP::Schema::provisioning::Result::voip_dbaliases =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -144,13 +144,13 @@ NGCP::Schema::provisioning::Result::voip_dbaliases Type: belongs_to -Related object: L +Related object: L =head2 subscriber Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_dom_preferences.pm b/lib/NGCP/Schema/Result/voip_dom_preferences.pm similarity index 84% rename from lib/NGCP/Schema/provisioning/Result/voip_dom_preferences.pm rename to lib/NGCP/Schema/Result/voip_dom_preferences.pm index bb12380d..00e1d737 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_dom_preferences.pm +++ b/lib/NGCP/Schema/Result/voip_dom_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_dom_preferences; +package NGCP::Schema::Result::voip_dom_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_dom_preferences"); +__PACKAGE__->table("provisioning.voip_dom_preferences"); __PACKAGE__->add_columns( @@ -57,7 +57,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "attribute", - "NGCP::Schema::provisioning::Result::voip_preferences", + "NGCP::Schema::Result::voip_preferences", { id => "attribute_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -65,7 +65,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "domain", - "NGCP::Schema::provisioning::Result::voip_domains", + "NGCP::Schema::Result::voip_domains", { id => "domain_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -79,7 +79,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_dom_preferences +NGCP::Schema::Result::voip_dom_preferences =head1 COMPONENTS LOADED @@ -91,7 +91,7 @@ NGCP::Schema::provisioning::Result::voip_dom_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -143,13 +143,13 @@ NGCP::Schema::provisioning::Result::voip_dom_preferences Type: belongs_to -Related object: L +Related object: L =head2 domain Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_domains.pm b/lib/NGCP/Schema/Result/voip_domains.pm similarity index 77% rename from lib/NGCP/Schema/provisioning/Result/voip_domains.pm rename to lib/NGCP/Schema/Result/voip_domains.pm index 3d4f42b3..e26507b4 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_domains.pm +++ b/lib/NGCP/Schema/Result/voip_domains.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_domains; +package NGCP::Schema::Result::voip_domains; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_domains"); +__PACKAGE__->table("provisioning.voip_domains"); __PACKAGE__->add_columns( @@ -39,7 +39,7 @@ __PACKAGE__->add_unique_constraint("domain_idx", ["domain"]); __PACKAGE__->has_many( "voip_dbaliases", - "NGCP::Schema::provisioning::Result::voip_dbaliases", + "NGCP::Schema::Result::voip_dbaliases", { "foreign.domain_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -47,15 +47,15 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_dom_preferences", - "NGCP::Schema::provisioning::Result::voip_dom_preferences", + "NGCP::Schema::Result::voip_dom_preferences", { "foreign.domain_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); __PACKAGE__->has_many( - "voip_subscribers", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "provisioning_voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { "foreign.domain_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -69,7 +69,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_domains +NGCP::Schema::Result::voip_domains =head1 COMPONENTS LOADED @@ -81,7 +81,7 @@ NGCP::Schema::provisioning::Result::voip_domains =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -122,19 +122,19 @@ NGCP::Schema::provisioning::Result::voip_domains Type: has_many -Related object: L +Related object: L =head2 voip_dom_preferences Type: has_many -Related object: L +Related object: L -=head2 voip_subscribers +=head2 provisioning_voip_subscribers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_fax_destinations.pm b/lib/NGCP/Schema/Result/voip_fax_destinations.pm similarity index 89% rename from lib/NGCP/Schema/provisioning/Result/voip_fax_destinations.pm rename to lib/NGCP/Schema/Result/voip_fax_destinations.pm index 3ea964af..92e5c71e 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_fax_destinations.pm +++ b/lib/NGCP/Schema/Result/voip_fax_destinations.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_fax_destinations; +package NGCP::Schema::Result::voip_fax_destinations; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_fax_destinations"); +__PACKAGE__->table("provisioning.voip_fax_destinations"); __PACKAGE__->add_columns( @@ -61,7 +61,7 @@ __PACKAGE__->add_unique_constraint("subdest_idx", ["subscriber_id", "destination __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -75,7 +75,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_fax_destinations +NGCP::Schema::Result::voip_fax_destinations =head1 COMPONENTS LOADED @@ -87,7 +87,7 @@ NGCP::Schema::provisioning::Result::voip_fax_destinations =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -168,7 +168,7 @@ NGCP::Schema::provisioning::Result::voip_fax_destinations Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_fax_preferences.pm b/lib/NGCP/Schema/Result/voip_fax_preferences.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/voip_fax_preferences.pm rename to lib/NGCP/Schema/Result/voip_fax_preferences.pm index c4323f5c..9bb1951f 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_fax_preferences.pm +++ b/lib/NGCP/Schema/Result/voip_fax_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_fax_preferences; +package NGCP::Schema::Result::voip_fax_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_fax_preferences"); +__PACKAGE__->table("provisioning.voip_fax_preferences"); __PACKAGE__->add_columns( @@ -54,7 +54,7 @@ __PACKAGE__->add_unique_constraint("subscriberid_idx", ["subscriber_id"]); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -68,7 +68,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_fax_preferences +NGCP::Schema::Result::voip_fax_preferences =head1 COMPONENTS LOADED @@ -80,7 +80,7 @@ NGCP::Schema::provisioning::Result::voip_fax_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -152,7 +152,7 @@ NGCP::Schema::provisioning::Result::voip_fax_preferences Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/voip_intercept.pm b/lib/NGCP/Schema/Result/voip_intercept.pm similarity index 92% rename from lib/NGCP/Schema/billing/Result/voip_intercept.pm rename to lib/NGCP/Schema/Result/voip_intercept.pm index 88afb7b0..d64f19d9 100644 --- a/lib/NGCP/Schema/billing/Result/voip_intercept.pm +++ b/lib/NGCP/Schema/Result/voip_intercept.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::voip_intercept; +package NGCP::Schema::Result::voip_intercept; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_intercept"); +__PACKAGE__->table("billing.voip_intercept"); __PACKAGE__->add_columns( @@ -71,7 +71,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -90,7 +90,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::voip_intercept +NGCP::Schema::Result::voip_intercept =head1 COMPONENTS LOADED @@ -102,7 +102,7 @@ NGCP::Schema::billing::Result::voip_intercept =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -194,7 +194,7 @@ NGCP::Schema::billing::Result::voip_intercept Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/voip_number_block_resellers.pm b/lib/NGCP/Schema/Result/voip_number_block_resellers.pm similarity index 82% rename from lib/NGCP/Schema/billing/Result/voip_number_block_resellers.pm rename to lib/NGCP/Schema/Result/voip_number_block_resellers.pm index 2325fea3..262405fe 100644 --- a/lib/NGCP/Schema/billing/Result/voip_number_block_resellers.pm +++ b/lib/NGCP/Schema/Result/voip_number_block_resellers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::voip_number_block_resellers; +package NGCP::Schema::Result::voip_number_block_resellers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_number_block_resellers"); +__PACKAGE__->table("billing.voip_number_block_resellers"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "number_block", - "NGCP::Schema::billing::Result::voip_number_blocks", + "NGCP::Schema::Result::voip_number_blocks", { id => "number_block_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::voip_number_block_resellers +NGCP::Schema::Result::voip_number_block_resellers =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::billing::Result::voip_number_block_resellers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -121,13 +121,13 @@ NGCP::Schema::billing::Result::voip_number_block_resellers Type: belongs_to -Related object: L +Related object: L =head2 reseller Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/voip_number_blocks.pm b/lib/NGCP/Schema/Result/voip_number_blocks.pm similarity index 88% rename from lib/NGCP/Schema/billing/Result/voip_number_blocks.pm rename to lib/NGCP/Schema/Result/voip_number_blocks.pm index 7bed6e14..afa52e83 100644 --- a/lib/NGCP/Schema/billing/Result/voip_number_blocks.pm +++ b/lib/NGCP/Schema/Result/voip_number_blocks.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::voip_number_blocks; +package NGCP::Schema::Result::voip_number_blocks; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_number_blocks"); +__PACKAGE__->table("billing.voip_number_blocks"); __PACKAGE__->add_columns( @@ -49,7 +49,7 @@ __PACKAGE__->add_unique_constraint("prefix_idx", ["cc", "ac", "sn_prefix"]); __PACKAGE__->has_many( "voip_number_block_resellers", - "NGCP::Schema::billing::Result::voip_number_block_resellers", + "NGCP::Schema::Result::voip_number_block_resellers", { "foreign.number_block_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -63,7 +63,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::voip_number_blocks +NGCP::Schema::Result::voip_number_blocks =head1 COMPONENTS LOADED @@ -75,7 +75,7 @@ NGCP::Schema::billing::Result::voip_number_blocks =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -150,7 +150,7 @@ NGCP::Schema::billing::Result::voip_number_blocks Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/voip_numbers.pm b/lib/NGCP/Schema/Result/voip_numbers.pm similarity index 88% rename from lib/NGCP/Schema/billing/Result/voip_numbers.pm rename to lib/NGCP/Schema/Result/voip_numbers.pm index 09308f9c..933e86ad 100644 --- a/lib/NGCP/Schema/billing/Result/voip_numbers.pm +++ b/lib/NGCP/Schema/Result/voip_numbers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::voip_numbers; +package NGCP::Schema::Result::voip_numbers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_numbers"); +__PACKAGE__->table("billing.voip_numbers"); __PACKAGE__->add_columns( @@ -73,7 +73,7 @@ __PACKAGE__->add_unique_constraint("number_idx", ["cc", "ac", "sn"]); __PACKAGE__->belongs_to( "reseller", - "NGCP::Schema::billing::Result::resellers", + "NGCP::Schema::Result::resellers", { id => "reseller_id" }, { is_deferrable => 1, @@ -86,7 +86,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::billing::Result::voip_subscribers", + "NGCP::Schema::Result::voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, @@ -99,7 +99,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_subscribers", - "NGCP::Schema::billing::Result::voip_subscribers", + "NGCP::Schema::Result::voip_subscribers", { "foreign.primary_number_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -113,7 +113,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::voip_numbers +NGCP::Schema::Result::voip_numbers =head1 COMPONENTS LOADED @@ -125,7 +125,7 @@ NGCP::Schema::billing::Result::voip_numbers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -216,19 +216,19 @@ NGCP::Schema::billing::Result::voip_numbers Type: belongs_to -Related object: L +Related object: L =head2 subscriber Type: belongs_to -Related object: L +Related object: L =head2 voip_subscribers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_peer_groups.pm b/lib/NGCP/Schema/Result/voip_peer_groups.pm similarity index 84% rename from lib/NGCP/Schema/provisioning/Result/voip_peer_groups.pm rename to lib/NGCP/Schema/Result/voip_peer_groups.pm index 4020686b..12978c2c 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_peer_groups.pm +++ b/lib/NGCP/Schema/Result/voip_peer_groups.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_peer_groups; +package NGCP::Schema::Result::voip_peer_groups; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_peer_groups"); +__PACKAGE__->table("provisioning.voip_peer_groups"); __PACKAGE__->add_columns( @@ -45,7 +45,7 @@ __PACKAGE__->add_unique_constraint("name", ["name"]); __PACKAGE__->has_many( "voip_peer_hosts", - "NGCP::Schema::provisioning::Result::voip_peer_hosts", + "NGCP::Schema::Result::voip_peer_hosts", { "foreign.group_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -53,7 +53,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_peer_rules", - "NGCP::Schema::provisioning::Result::voip_peer_rules", + "NGCP::Schema::Result::voip_peer_rules", { "foreign.group_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_peer_groups +NGCP::Schema::Result::voip_peer_groups =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::provisioning::Result::voip_peer_groups =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -138,13 +138,13 @@ NGCP::Schema::provisioning::Result::voip_peer_groups Type: has_many -Related object: L +Related object: L =head2 voip_peer_rules Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_peer_hosts.pm b/lib/NGCP/Schema/Result/voip_peer_hosts.pm similarity index 87% rename from lib/NGCP/Schema/provisioning/Result/voip_peer_hosts.pm rename to lib/NGCP/Schema/Result/voip_peer_hosts.pm index 0b5d6899..09dbbdd8 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_peer_hosts.pm +++ b/lib/NGCP/Schema/Result/voip_peer_hosts.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_peer_hosts; +package NGCP::Schema::Result::voip_peer_hosts; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_peer_hosts"); +__PACKAGE__->table("provisioning.voip_peer_hosts"); __PACKAGE__->add_columns( @@ -58,7 +58,7 @@ __PACKAGE__->add_unique_constraint("grpname", ["group_id", "name"]); __PACKAGE__->belongs_to( "group", - "NGCP::Schema::provisioning::Result::voip_peer_groups", + "NGCP::Schema::Result::voip_peer_groups", { id => "group_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -66,7 +66,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_peer_preferences", - "NGCP::Schema::provisioning::Result::voip_peer_preferences", + "NGCP::Schema::Result::voip_peer_preferences", { "foreign.peer_host_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -80,7 +80,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_peer_hosts +NGCP::Schema::Result::voip_peer_hosts =head1 COMPONENTS LOADED @@ -92,7 +92,7 @@ NGCP::Schema::provisioning::Result::voip_peer_hosts =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -179,13 +179,13 @@ NGCP::Schema::provisioning::Result::voip_peer_hosts Type: belongs_to -Related object: L +Related object: L =head2 voip_peer_preferences Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_peer_preferences.pm b/lib/NGCP/Schema/Result/voip_peer_preferences.pm similarity index 84% rename from lib/NGCP/Schema/provisioning/Result/voip_peer_preferences.pm rename to lib/NGCP/Schema/Result/voip_peer_preferences.pm index 590f5480..60240126 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_peer_preferences.pm +++ b/lib/NGCP/Schema/Result/voip_peer_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_peer_preferences; +package NGCP::Schema::Result::voip_peer_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_peer_preferences"); +__PACKAGE__->table("provisioning.voip_peer_preferences"); __PACKAGE__->add_columns( @@ -57,7 +57,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "attribute", - "NGCP::Schema::provisioning::Result::voip_preferences", + "NGCP::Schema::Result::voip_preferences", { id => "attribute_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -65,7 +65,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "peer_host", - "NGCP::Schema::provisioning::Result::voip_peer_hosts", + "NGCP::Schema::Result::voip_peer_hosts", { id => "peer_host_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -79,7 +79,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_peer_preferences +NGCP::Schema::Result::voip_peer_preferences =head1 COMPONENTS LOADED @@ -91,7 +91,7 @@ NGCP::Schema::provisioning::Result::voip_peer_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -143,13 +143,13 @@ NGCP::Schema::provisioning::Result::voip_peer_preferences Type: belongs_to -Related object: L +Related object: L =head2 peer_host Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_peer_rules.pm b/lib/NGCP/Schema/Result/voip_peer_rules.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/voip_peer_rules.pm rename to lib/NGCP/Schema/Result/voip_peer_rules.pm index b7ef7180..6171e248 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_peer_rules.pm +++ b/lib/NGCP/Schema/Result/voip_peer_rules.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_peer_rules; +package NGCP::Schema::Result::voip_peer_rules; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_peer_rules"); +__PACKAGE__->table("provisioning.voip_peer_rules"); __PACKAGE__->add_columns( @@ -49,7 +49,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "group", - "NGCP::Schema::provisioning::Result::voip_peer_groups", + "NGCP::Schema::Result::voip_peer_groups", { id => "group_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -63,7 +63,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_peer_rules +NGCP::Schema::Result::voip_peer_rules =head1 COMPONENTS LOADED @@ -75,7 +75,7 @@ NGCP::Schema::provisioning::Result::voip_peer_rules =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -133,7 +133,7 @@ NGCP::Schema::provisioning::Result::voip_peer_rules Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_preference_groups.pm b/lib/NGCP/Schema/Result/voip_preference_groups.pm similarity index 82% rename from lib/NGCP/Schema/provisioning/Result/voip_preference_groups.pm rename to lib/NGCP/Schema/Result/voip_preference_groups.pm index 81bfe899..5fdae4be 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_preference_groups.pm +++ b/lib/NGCP/Schema/Result/voip_preference_groups.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_preference_groups; +package NGCP::Schema::Result::voip_preference_groups; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_preference_groups"); +__PACKAGE__->table("provisioning.voip_preference_groups"); __PACKAGE__->add_columns( @@ -36,7 +36,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "voip_preferences", - "NGCP::Schema::provisioning::Result::voip_preferences", + "NGCP::Schema::Result::voip_preferences", { "foreign.voip_preference_groups_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -50,7 +50,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_preference_groups +NGCP::Schema::Result::voip_preference_groups =head1 COMPONENTS LOADED @@ -62,7 +62,7 @@ NGCP::Schema::provisioning::Result::voip_preference_groups =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -93,7 +93,7 @@ NGCP::Schema::provisioning::Result::voip_preference_groups Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_preferences.pm b/lib/NGCP/Schema/Result/voip_preferences.pm similarity index 83% rename from lib/NGCP/Schema/provisioning/Result/voip_preferences.pm rename to lib/NGCP/Schema/Result/voip_preferences.pm index f5c1e01f..0b7a7a43 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_preferences.pm +++ b/lib/NGCP/Schema/Result/voip_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_preferences; +package NGCP::Schema::Result::voip_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_preferences"); +__PACKAGE__->table("provisioning.voip_preferences"); __PACKAGE__->add_columns( @@ -75,7 +75,7 @@ __PACKAGE__->add_unique_constraint("attribute_idx", ["attribute"]); __PACKAGE__->has_many( "voip_dom_preferences", - "NGCP::Schema::provisioning::Result::voip_dom_preferences", + "NGCP::Schema::Result::voip_dom_preferences", { "foreign.attribute_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -83,7 +83,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_peer_preferences", - "NGCP::Schema::provisioning::Result::voip_peer_preferences", + "NGCP::Schema::Result::voip_peer_preferences", { "foreign.attribute_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -91,7 +91,7 @@ __PACKAGE__->has_many( __PACKAGE__->belongs_to( "voip_preference_group", - "NGCP::Schema::provisioning::Result::voip_preference_groups", + "NGCP::Schema::Result::voip_preference_groups", { id => "voip_preference_groups_id" }, { is_deferrable => 1, on_delete => "RESTRICT", on_update => "CASCADE" }, ); @@ -99,7 +99,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_preferences_enums", - "NGCP::Schema::provisioning::Result::voip_preferences_enum", + "NGCP::Schema::Result::voip_preferences_enum", { "foreign.preference_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -107,7 +107,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "voip_usr_preferences", - "NGCP::Schema::provisioning::Result::voip_usr_preferences", + "NGCP::Schema::Result::voip_usr_preferences", { "foreign.attribute_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -121,7 +121,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_preferences +NGCP::Schema::Result::voip_preferences =head1 COMPONENTS LOADED @@ -133,7 +133,7 @@ NGCP::Schema::provisioning::Result::voip_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -241,31 +241,31 @@ NGCP::Schema::provisioning::Result::voip_preferences Type: has_many -Related object: L +Related object: L =head2 voip_peer_preferences Type: has_many -Related object: L +Related object: L =head2 voip_preference_group Type: belongs_to -Related object: L +Related object: L =head2 voip_preferences_enums Type: has_many -Related object: L +Related object: L =head2 voip_usr_preferences Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_preferences_enum.pm b/lib/NGCP/Schema/Result/voip_preferences_enum.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/voip_preferences_enum.pm rename to lib/NGCP/Schema/Result/voip_preferences_enum.pm index 12c8d927..b377b550 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_preferences_enum.pm +++ b/lib/NGCP/Schema/Result/voip_preferences_enum.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_preferences_enum; +package NGCP::Schema::Result::voip_preferences_enum; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_preferences_enum"); +__PACKAGE__->table("provisioning.voip_preferences_enum"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "preference", - "NGCP::Schema::provisioning::Result::voip_preferences", + "NGCP::Schema::Result::voip_preferences", { id => "preference_id" }, { is_deferrable => 1, @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_preferences_enum +NGCP::Schema::Result::voip_preferences_enum =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::provisioning::Result::voip_preferences_enum =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -145,7 +145,7 @@ NGCP::Schema::provisioning::Result::voip_preferences_enum Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_reminder.pm b/lib/NGCP/Schema/Result/voip_reminder.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/voip_reminder.pm rename to lib/NGCP/Schema/Result/voip_reminder.pm index 27038b8d..b65fae11 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_reminder.pm +++ b/lib/NGCP/Schema/Result/voip_reminder.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_reminder; +package NGCP::Schema::Result::voip_reminder; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_reminder"); +__PACKAGE__->table("provisioning.voip_reminder"); __PACKAGE__->add_columns( @@ -53,7 +53,7 @@ __PACKAGE__->add_unique_constraint("subscriber_id", ["subscriber_id"]); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -67,7 +67,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_reminder +NGCP::Schema::Result::voip_reminder =head1 COMPONENTS LOADED @@ -79,7 +79,7 @@ NGCP::Schema::provisioning::Result::voip_reminder =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -134,7 +134,7 @@ NGCP::Schema::provisioning::Result::voip_reminder Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_rewrite_rule_sets.pm b/lib/NGCP/Schema/Result/voip_rewrite_rule_sets.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/voip_rewrite_rule_sets.pm rename to lib/NGCP/Schema/Result/voip_rewrite_rule_sets.pm index 180b2ea2..2c6afe12 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_rewrite_rule_sets.pm +++ b/lib/NGCP/Schema/Result/voip_rewrite_rule_sets.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_rewrite_rule_sets; +package NGCP::Schema::Result::voip_rewrite_rule_sets; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_rewrite_rule_sets"); +__PACKAGE__->table("provisioning.voip_rewrite_rule_sets"); __PACKAGE__->add_columns( @@ -49,7 +49,7 @@ __PACKAGE__->add_unique_constraint("name_idx", ["name"]); __PACKAGE__->has_many( "voip_rewrite_rules", - "NGCP::Schema::provisioning::Result::voip_rewrite_rules", + "NGCP::Schema::Result::voip_rewrite_rules", { "foreign.set_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -63,7 +63,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_rewrite_rule_sets +NGCP::Schema::Result::voip_rewrite_rule_sets =head1 COMPONENTS LOADED @@ -75,7 +75,7 @@ NGCP::Schema::provisioning::Result::voip_rewrite_rule_sets =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -146,7 +146,7 @@ NGCP::Schema::provisioning::Result::voip_rewrite_rule_sets Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_rewrite_rules.pm b/lib/NGCP/Schema/Result/voip_rewrite_rules.pm similarity index 89% rename from lib/NGCP/Schema/provisioning/Result/voip_rewrite_rules.pm rename to lib/NGCP/Schema/Result/voip_rewrite_rules.pm index b53a49e0..5b7e3fbc 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_rewrite_rules.pm +++ b/lib/NGCP/Schema/Result/voip_rewrite_rules.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_rewrite_rules; +package NGCP::Schema::Result::voip_rewrite_rules; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_rewrite_rules"); +__PACKAGE__->table("provisioning.voip_rewrite_rules"); __PACKAGE__->add_columns( @@ -68,7 +68,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "set", - "NGCP::Schema::provisioning::Result::voip_rewrite_rule_sets", + "NGCP::Schema::Result::voip_rewrite_rule_sets", { id => "set_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -82,7 +82,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_rewrite_rules +NGCP::Schema::Result::voip_rewrite_rules =head1 COMPONENTS LOADED @@ -94,7 +94,7 @@ NGCP::Schema::provisioning::Result::voip_rewrite_rules =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -167,7 +167,7 @@ NGCP::Schema::provisioning::Result::voip_rewrite_rules Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_rwrs_sequence.pm b/lib/NGCP/Schema/Result/voip_rwrs_sequence.pm similarity index 86% rename from lib/NGCP/Schema/provisioning/Result/voip_rwrs_sequence.pm rename to lib/NGCP/Schema/Result/voip_rwrs_sequence.pm index f09e9f60..7f5f166d 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_rwrs_sequence.pm +++ b/lib/NGCP/Schema/Result/voip_rwrs_sequence.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_rwrs_sequence; +package NGCP::Schema::Result::voip_rwrs_sequence; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_rwrs_sequence"); +__PACKAGE__->table("provisioning.voip_rwrs_sequence"); __PACKAGE__->add_columns( @@ -40,7 +40,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_rwrs_sequence +NGCP::Schema::Result::voip_rwrs_sequence =head1 COMPONENTS LOADED @@ -52,7 +52,7 @@ NGCP::Schema::provisioning::Result::voip_rwrs_sequence =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/provisioning/Result/voip_sound_files.pm b/lib/NGCP/Schema/Result/voip_sound_files.pm similarity index 85% rename from lib/NGCP/Schema/provisioning/Result/voip_sound_files.pm rename to lib/NGCP/Schema/Result/voip_sound_files.pm index 4cb8d5d8..15b33e1b 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_sound_files.pm +++ b/lib/NGCP/Schema/Result/voip_sound_files.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_sound_files; +package NGCP::Schema::Result::voip_sound_files; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_sound_files"); +__PACKAGE__->table("provisioning.voip_sound_files"); __PACKAGE__->add_columns( @@ -41,7 +41,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "handle", - "NGCP::Schema::provisioning::Result::voip_sound_handles", + "NGCP::Schema::Result::voip_sound_handles", { id => "handle_id" }, { is_deferrable => 1, @@ -54,7 +54,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "set", - "NGCP::Schema::provisioning::Result::voip_sound_sets", + "NGCP::Schema::Result::voip_sound_sets", { id => "set_id" }, { is_deferrable => 1, @@ -73,7 +73,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_sound_files +NGCP::Schema::Result::voip_sound_files =head1 COMPONENTS LOADED @@ -85,7 +85,7 @@ NGCP::Schema::provisioning::Result::voip_sound_files =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -145,13 +145,13 @@ NGCP::Schema::provisioning::Result::voip_sound_files Type: belongs_to -Related object: L +Related object: L =head2 set Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_sound_groups.pm b/lib/NGCP/Schema/Result/voip_sound_groups.pm similarity index 83% rename from lib/NGCP/Schema/provisioning/Result/voip_sound_groups.pm rename to lib/NGCP/Schema/Result/voip_sound_groups.pm index a3129ebd..2b0c7248 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_sound_groups.pm +++ b/lib/NGCP/Schema/Result/voip_sound_groups.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_sound_groups; +package NGCP::Schema::Result::voip_sound_groups; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_sound_groups"); +__PACKAGE__->table("provisioning.voip_sound_groups"); __PACKAGE__->add_columns( @@ -36,7 +36,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "voip_sounds_handles", - "NGCP::Schema::provisioning::Result::voip_sound_handles", + "NGCP::Schema::Result::voip_sound_handles", { "foreign.group_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -50,7 +50,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_sound_groups +NGCP::Schema::Result::voip_sound_groups =head1 COMPONENTS LOADED @@ -62,7 +62,7 @@ NGCP::Schema::provisioning::Result::voip_sound_groups =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -93,7 +93,7 @@ NGCP::Schema::provisioning::Result::voip_sound_groups Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_sound_handles.pm b/lib/NGCP/Schema/Result/voip_sound_handles.pm similarity index 80% rename from lib/NGCP/Schema/provisioning/Result/voip_sound_handles.pm rename to lib/NGCP/Schema/Result/voip_sound_handles.pm index 76e2cb02..2254d5a9 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_sound_handles.pm +++ b/lib/NGCP/Schema/Result/voip_sound_handles.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_sound_handles; +package NGCP::Schema::Result::voip_sound_handles; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_sound_handles"); +__PACKAGE__->table("provisioning.voip_sound_handles"); __PACKAGE__->add_columns( @@ -38,7 +38,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "group", - "NGCP::Schema::provisioning::Result::voip_sound_groups", + "NGCP::Schema::Result::voip_sound_groups", { id => "group_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -46,7 +46,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_sound_files", - "NGCP::Schema::provisioning::Result::voip_sound_files", + "NGCP::Schema::Result::voip_sound_files", { "foreign.handle_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -60,7 +60,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_sound_handles +NGCP::Schema::Result::voip_sound_handles =head1 COMPONENTS LOADED @@ -72,7 +72,7 @@ NGCP::Schema::provisioning::Result::voip_sound_handles =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -109,13 +109,13 @@ NGCP::Schema::provisioning::Result::voip_sound_handles Type: belongs_to -Related object: L +Related object: L =head2 voip_sound_files Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_sound_sets.pm b/lib/NGCP/Schema/Result/voip_sound_sets.pm similarity index 84% rename from lib/NGCP/Schema/provisioning/Result/voip_sound_sets.pm rename to lib/NGCP/Schema/Result/voip_sound_sets.pm index a0c234dd..a5b7c8a9 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_sound_sets.pm +++ b/lib/NGCP/Schema/Result/voip_sound_sets.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_sound_sets; +package NGCP::Schema::Result::voip_sound_sets; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_sound_sets"); +__PACKAGE__->table("provisioning.voip_sound_sets"); __PACKAGE__->add_columns( @@ -33,7 +33,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "voip_sound_files", - "NGCP::Schema::provisioning::Result::voip_sound_files", + "NGCP::Schema::Result::voip_sound_files", { "foreign.set_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -47,7 +47,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_sound_sets +NGCP::Schema::Result::voip_sound_sets =head1 COMPONENTS LOADED @@ -59,7 +59,7 @@ NGCP::Schema::provisioning::Result::voip_sound_sets =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -95,7 +95,7 @@ NGCP::Schema::provisioning::Result::voip_sound_sets Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_speed_dial.pm b/lib/NGCP/Schema/Result/voip_speed_dial.pm similarity index 87% rename from lib/NGCP/Schema/provisioning/Result/voip_speed_dial.pm rename to lib/NGCP/Schema/Result/voip_speed_dial.pm index 2f086e80..0dcd8ca9 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_speed_dial.pm +++ b/lib/NGCP/Schema/Result/voip_speed_dial.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_speed_dial; +package NGCP::Schema::Result::voip_speed_dial; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_speed_dial"); +__PACKAGE__->table("provisioning.voip_speed_dial"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->add_unique_constraint("subscriberid_slot_idx", ["subscriber_id", "s __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -62,7 +62,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_speed_dial +NGCP::Schema::Result::voip_speed_dial =head1 COMPONENTS LOADED @@ -74,7 +74,7 @@ NGCP::Schema::provisioning::Result::voip_speed_dial =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -130,7 +130,7 @@ NGCP::Schema::provisioning::Result::voip_speed_dial Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/billing/Result/voip_subscribers.pm b/lib/NGCP/Schema/Result/voip_subscribers.pm similarity index 85% rename from lib/NGCP/Schema/billing/Result/voip_subscribers.pm rename to lib/NGCP/Schema/Result/voip_subscribers.pm index f3c8a79f..6a945781 100644 --- a/lib/NGCP/Schema/billing/Result/voip_subscribers.pm +++ b/lib/NGCP/Schema/Result/voip_subscribers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::billing::Result::voip_subscribers; +package NGCP::Schema::Result::voip_subscribers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_subscribers"); +__PACKAGE__->table("billing.voip_subscribers"); __PACKAGE__->add_columns( @@ -71,7 +71,7 @@ __PACKAGE__->add_unique_constraint("uuid_idx", ["uuid"]); __PACKAGE__->belongs_to( "contract", - "NGCP::Schema::billing::Result::contracts", + "NGCP::Schema::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -79,7 +79,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "domain", - "NGCP::Schema::billing::Result::domains", + "NGCP::Schema::Result::domains", { id => "domain_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -87,7 +87,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "primary_number", - "NGCP::Schema::billing::Result::voip_numbers", + "NGCP::Schema::Result::voip_numbers", { id => "primary_number_id" }, { is_deferrable => 1, @@ -100,7 +100,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->has_many( "voip_numbers", - "NGCP::Schema::billing::Result::voip_numbers", + "NGCP::Schema::Result::voip_numbers", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -114,7 +114,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::billing::Result::voip_subscribers +NGCP::Schema::Result::voip_subscribers =head1 COMPONENTS LOADED @@ -126,7 +126,7 @@ NGCP::Schema::billing::Result::voip_subscribers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -207,25 +207,25 @@ NGCP::Schema::billing::Result::voip_subscribers Type: belongs_to -Related object: L +Related object: L =head2 domain Type: belongs_to -Related object: L +Related object: L =head2 primary_number Type: belongs_to -Related object: L +Related object: L =head2 voip_numbers Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_trusted_sources.pm b/lib/NGCP/Schema/Result/voip_trusted_sources.pm similarity index 87% rename from lib/NGCP/Schema/provisioning/Result/voip_trusted_sources.pm rename to lib/NGCP/Schema/Result/voip_trusted_sources.pm index 5fc87ca3..77fb0643 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_trusted_sources.pm +++ b/lib/NGCP/Schema/Result/voip_trusted_sources.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_trusted_sources; +package NGCP::Schema::Result::voip_trusted_sources; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_trusted_sources"); +__PACKAGE__->table("provisioning.voip_trusted_sources"); __PACKAGE__->add_columns( @@ -49,7 +49,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -63,7 +63,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_trusted_sources +NGCP::Schema::Result::voip_trusted_sources =head1 COMPONENTS LOADED @@ -75,7 +75,7 @@ NGCP::Schema::provisioning::Result::voip_trusted_sources =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -131,7 +131,7 @@ NGCP::Schema::provisioning::Result::voip_trusted_sources Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/voip_usr_preferences.pm b/lib/NGCP/Schema/Result/voip_usr_preferences.pm similarity index 84% rename from lib/NGCP/Schema/provisioning/Result/voip_usr_preferences.pm rename to lib/NGCP/Schema/Result/voip_usr_preferences.pm index 67cab8e0..208fba7f 100644 --- a/lib/NGCP/Schema/provisioning/Result/voip_usr_preferences.pm +++ b/lib/NGCP/Schema/Result/voip_usr_preferences.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::voip_usr_preferences; +package NGCP::Schema::Result::voip_usr_preferences; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("voip_usr_preferences"); +__PACKAGE__->table("provisioning.voip_usr_preferences"); __PACKAGE__->add_columns( @@ -57,7 +57,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "attribute", - "NGCP::Schema::provisioning::Result::voip_preferences", + "NGCP::Schema::Result::voip_preferences", { id => "attribute_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -65,7 +65,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "subscriber", - "NGCP::Schema::provisioning::Result::voip_subscribers", + "NGCP::Schema::Result::provisioning_voip_subscribers", { id => "subscriber_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -79,7 +79,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::voip_usr_preferences +NGCP::Schema::Result::voip_usr_preferences =head1 COMPONENTS LOADED @@ -91,7 +91,7 @@ NGCP::Schema::provisioning::Result::voip_usr_preferences =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -143,13 +143,13 @@ NGCP::Schema::provisioning::Result::voip_usr_preferences Type: belongs_to -Related object: L +Related object: L =head2 subscriber Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/kamailio/Result/watchers.pm b/lib/NGCP/Schema/Result/watchers.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/watchers.pm rename to lib/NGCP/Schema/Result/watchers.pm index 50b8a869..6dec0951 100644 --- a/lib/NGCP/Schema/kamailio/Result/watchers.pm +++ b/lib/NGCP/Schema/Result/watchers.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::watchers; +package NGCP::Schema::Result::watchers; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("watchers"); +__PACKAGE__->table("kamailio.watchers"); __PACKAGE__->add_columns( @@ -65,7 +65,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::watchers +NGCP::Schema::Result::watchers =head1 COMPONENTS LOADED @@ -77,7 +77,7 @@ NGCP::Schema::kamailio::Result::watchers =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/kamailio/Result/xcap.pm b/lib/NGCP/Schema/Result/xcap.pm similarity index 94% rename from lib/NGCP/Schema/kamailio/Result/xcap.pm rename to lib/NGCP/Schema/Result/xcap.pm index f8171803..eff0ac36 100644 --- a/lib/NGCP/Schema/kamailio/Result/xcap.pm +++ b/lib/NGCP/Schema/Result/xcap.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::kamailio::Result::xcap; +package NGCP::Schema::Result::xcap; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("xcap"); +__PACKAGE__->table("kamailio.xcap"); __PACKAGE__->add_columns( @@ -59,7 +59,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::kamailio::Result::xcap +NGCP::Schema::Result::xcap =head1 COMPONENTS LOADED @@ -71,7 +71,7 @@ NGCP::Schema::kamailio::Result::xcap =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/provisioning/Result/xmlgroups.pm b/lib/NGCP/Schema/Result/xmlgroups.pm similarity index 84% rename from lib/NGCP/Schema/provisioning/Result/xmlgroups.pm rename to lib/NGCP/Schema/Result/xmlgroups.pm index 460cf035..96ca875d 100644 --- a/lib/NGCP/Schema/provisioning/Result/xmlgroups.pm +++ b/lib/NGCP/Schema/Result/xmlgroups.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::xmlgroups; +package NGCP::Schema::Result::xmlgroups; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("xmlgroups"); +__PACKAGE__->table("provisioning.xmlgroups"); __PACKAGE__->add_columns( @@ -36,7 +36,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "xmlhostgroups", - "NGCP::Schema::provisioning::Result::xmlhostgroups", + "NGCP::Schema::Result::xmlhostgroups", { "foreign.group_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -50,7 +50,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::xmlgroups +NGCP::Schema::Result::xmlgroups =head1 COMPONENTS LOADED @@ -62,7 +62,7 @@ NGCP::Schema::provisioning::Result::xmlgroups =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -93,7 +93,7 @@ NGCP::Schema::provisioning::Result::xmlgroups Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/xmlhostgroups.pm b/lib/NGCP/Schema/Result/xmlhostgroups.pm similarity index 83% rename from lib/NGCP/Schema/provisioning/Result/xmlhostgroups.pm rename to lib/NGCP/Schema/Result/xmlhostgroups.pm index 92f1846c..90e79359 100644 --- a/lib/NGCP/Schema/provisioning/Result/xmlhostgroups.pm +++ b/lib/NGCP/Schema/Result/xmlhostgroups.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::xmlhostgroups; +package NGCP::Schema::Result::xmlhostgroups; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("xmlhostgroups"); +__PACKAGE__->table("provisioning.xmlhostgroups"); __PACKAGE__->add_columns( @@ -48,7 +48,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to( "group", - "NGCP::Schema::provisioning::Result::xmlgroups", + "NGCP::Schema::Result::xmlgroups", { id => "group_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -56,7 +56,7 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to( "host", - "NGCP::Schema::provisioning::Result::xmlhosts", + "NGCP::Schema::Result::xmlhosts", { id => "host_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); @@ -70,7 +70,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::xmlhostgroups +NGCP::Schema::Result::xmlhostgroups =head1 COMPONENTS LOADED @@ -82,7 +82,7 @@ NGCP::Schema::provisioning::Result::xmlhostgroups =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -121,13 +121,13 @@ NGCP::Schema::provisioning::Result::xmlhostgroups Type: belongs_to -Related object: L +Related object: L =head2 host Type: belongs_to -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/xmlhosts.pm b/lib/NGCP/Schema/Result/xmlhosts.pm similarity index 88% rename from lib/NGCP/Schema/provisioning/Result/xmlhosts.pm rename to lib/NGCP/Schema/Result/xmlhosts.pm index 943671b3..08fe5c0d 100644 --- a/lib/NGCP/Schema/provisioning/Result/xmlhosts.pm +++ b/lib/NGCP/Schema/Result/xmlhosts.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::xmlhosts; +package NGCP::Schema::Result::xmlhosts; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("xmlhosts"); +__PACKAGE__->table("provisioning.xmlhosts"); __PACKAGE__->add_columns( @@ -44,7 +44,7 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( "xmlhostgroups", - "NGCP::Schema::provisioning::Result::xmlhostgroups", + "NGCP::Schema::Result::xmlhostgroups", { "foreign.host_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -58,7 +58,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::xmlhosts +NGCP::Schema::Result::xmlhosts =head1 COMPONENTS LOADED @@ -70,7 +70,7 @@ NGCP::Schema::provisioning::Result::xmlhosts =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS @@ -126,7 +126,7 @@ NGCP::Schema::provisioning::Result::xmlhosts Type: has_many -Related object: L +Related object: L =cut diff --git a/lib/NGCP/Schema/provisioning/Result/xmlqueue.pm b/lib/NGCP/Schema/Result/xmlqueue.pm similarity index 93% rename from lib/NGCP/Schema/provisioning/Result/xmlqueue.pm rename to lib/NGCP/Schema/Result/xmlqueue.pm index 532c8315..5bc305c6 100644 --- a/lib/NGCP/Schema/provisioning/Result/xmlqueue.pm +++ b/lib/NGCP/Schema/Result/xmlqueue.pm @@ -1,4 +1,4 @@ -package NGCP::Schema::provisioning::Result::xmlqueue; +package NGCP::Schema::Result::xmlqueue; use Sipwise::Base; use MooseX::NonMoose; use Scalar::Util qw(blessed); @@ -15,7 +15,7 @@ extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON"); -__PACKAGE__->table("xmlqueue"); +__PACKAGE__->table("provisioning.xmlqueue"); __PACKAGE__->add_columns( @@ -52,7 +52,7 @@ sub TO_JSON { =head1 NAME -NGCP::Schema::provisioning::Result::xmlqueue +NGCP::Schema::Result::xmlqueue =head1 COMPONENTS LOADED @@ -64,7 +64,7 @@ NGCP::Schema::provisioning::Result::xmlqueue =back -=head1 TABLE: C +=head1 TABLE: C =head1 ACCESSORS diff --git a/lib/NGCP/Schema/accounting.pm b/lib/NGCP/Schema/accounting.pm deleted file mode 100644 index 5689c6c4..00000000 --- a/lib/NGCP/Schema/accounting.pm +++ /dev/null @@ -1,26 +0,0 @@ -package NGCP::Schema::accounting; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:51:39 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z1aNc/ZIKuZ3Q4C76a43rA - -use MooseX::ClassAttribute qw(class_has); - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); - -method connection { - $self->SUPER::connection($self->config->as_hash->{accountingdb}); -} - -__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/NGCP/Schema/billing.pm b/lib/NGCP/Schema/billing.pm deleted file mode 100644 index 039c49f3..00000000 --- a/lib/NGCP/Schema/billing.pm +++ /dev/null @@ -1,411 +0,0 @@ -package NGCP::Schema::billing; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:51:46 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DHRR5lVe8fUgAfjVktxnZw - -use MooseX::ClassAttribute qw(class_has); -use NGCP::Schema qw(); -use NGCP::Schema::provisioning qw(); -use aliased 'NGCP::Schema::Exception'; - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); -has('validator', is => 'rw', isa => 'NGCP::Schema', lazy => 1, default => sub { return NGCP::Schema->new; }); -has('provisioning', is => 'rw', isa => 'NGCP::Schema::provisioning', lazy => 1, default => sub { - return NGCP::Schema::provisioning->connect; -}); - -method connection { - $self->SUPER::connection($self->config->as_hash->{billingdb}); -} - -method get_domain($reseller_id, $domain) { - my %return; - $return{domain} = $domain; - try { - $return{id} = $self->resultset('domains')->search( - { - domain => $domain, - defined($reseller_id) - ? ( - 'domain_resellers.domain_id' => {-ident => 'me.id'}, - 'domain_resellers.reseller_id' => $reseller_id, - ) - : () - }, - { - join => 'domain_resellers', - select => [{distinct => ['me.id']}], - as => ['id'], - } - )->single->id; - }; - Exception->throw({ - description => 'Client.Voip.NoSuchDomain', - message => "unknown domain '$domain'", - context => {object => $domain}, - }) unless defined $return{id} and $return{id}; - $return{resellers} = [ - map { $_->reseller_id } - $self->resultset('domain_resellers')->search( - { - domain_id => $return{id}, - reseller_id => {-ident => 'reseller.id'}, - status => {q{!=} => 'terminated'}, - }, - { - join => 'reseller', - columns => ['reseller_id'], - } - )->all - ] unless $reseller_id; - $return{subscribers} = { - map { $_->status => $_->get_column('count') } - $self->resultset('voip_subscribers')->search({ - domain_id => $return{id}, - contract_id => {-ident => 'contract.id'}, - defined($reseller_id) - ? ('contract.reseller_id' => $reseller_id) - : () - }, - { - select => ['status', {count => '*', -as => 'count'},], - join => 'contract', - group_by => ['status'], - } - )->all - }; - for my $status (qw(active locked terminated)) { - $return{subscribers}{$status} = 0 unless exists $return{subscribers}{$status}; - } - return \%return; -} - -method create_domain($data, $reseller_id?) { -# FIXME MXMS validation should throw objects - Exception->throw({ - description => 'Client.Syntax.MissingParam', - message => "missing parameter 'domain' in request", - }) unless exists $data->{domain}; - Exception->throw({ - description => 'Client.Syntax.MalformedDomain', - message => "malformed domain '$data->{domain}' in request", - }) unless $self->validator->check_domain({domain => $data->{domain}}); -# /FIXME - $self->txn_do(sub { - # just to verify the domain does not exist for the reseller - my $dbdom; - try { - $dbdom = $self->get_domain($reseller_id, $data->{domain}); - }; - if (defined $dbdom) { - Exception->throw({ - description => 'Client.Voip.ExistingDomain', - message => "domain '$data->{domain}' already exists in the billing database", - context => {object => $data->{domain}}, - }); - } - # see if the domain exists at all - # this forces domains to be unique! - # we need this to simplify our overall data structure a bit - # at least our voip_dom_preferences are partially depending on it - try { - $dbdom = $self->get_domain(undef, $data->{domain}); - }; - if (defined $dbdom) { - Exception->throw({ - description => 'Client.Voip.ExistingDomain', - message => "domain '$data->{domain}' already in use by another reseller", - context => {object => $data->{domain}}, - }); - } - # FIXME why does it test for $dbdom again? didn't we just above leave flow control? - if (defined $dbdom) { - $self->resultset('domain_resellers')->create({ - domain_id => $dbdom->{id}, - reseller_id => $reseller_id, - }) if defined $reseller_id; - } else { - # FIXME see docs about create: "keyed on the relationship name" - my $row = $self->resultset('domains')->create({domain => $data->{domain}}); - $self->resultset('domain_resellers')->create({ - domain_id => $row->id, - reseller_id => $reseller_id, - }) if defined $reseller_id; - } - # domain may already exist in provisioning DB if another reseller uses it - my $provisioning = $self->provisioning; - my $dom; - try { - $dom = $provisioning->get_domain({domain => $data->{domain}}); - }; - if (defined $dom) { - $provisioning->update_domain($data); - } else { - $provisioning->create_domain($data); - } - }); - return; -} - -method delete_domain($data, $reseller_id) { - Exception->throw({ - description => 'Client.Syntax.MissingParam', - message => "missing parameter 'domain' in request", - }) unless exists $data->{domain}; - Exception->throw({ - description => 'Client.Syntax.MalformedDomain', - message => "malformed domain '$data->{domain}' in request", - }) unless $self->validator->check_domain({domain => $data->{domain}}); - $self->txn_do(sub { - my $remaining_resellers = $self->delete_domain($reseller_id, $data->{domain}); - unless ($remaining_resellers) { - # just to verify the domain exists - my $dbdom = $self->get_domain($reseller_id, $data->{domain}); - $self->resultset('domain_resellers')->search( - { - domain_id => $dbdom->{id}, - defined($reseller_id) - ? (reseller => $reseller_id) - : (), - } - )->delete_all; - my $dc = $self->resultset('domain_resellers')->search( - { - domain_id => $dbdom->{id}, - } - )->count; - if ($dc == 0) { - # remove contracts and subscribers first - $self->_delete_domain_contracts_and_subscribers($dbdom->{id}, $reseller_id); - if ($reseller_id) { - # reseller admin, see if another reseller has subscribers - # within the domain (as dc==0, they should be terminated ones) - my $osc = $self->resultset('voip_subscribers')->search( - { - contract_id => {-ident => 'contracts.id'}, - domain_id => $dbdom->{id}, - reseller_id => {q{!=} => $reseller_id}, - }, - { - join => 'contracts', - } - )->count; - if($osc == 0) { - # no "foreign" data, delete the complete domain - $self->resultset('domains')->find($dbdom->{id})->delete_all; - } - } else { - # superuser, delete complete domain - $self->resultset('domains')->find($dbdom->{id})->delete_all; - } - } else { - # paranoia - Exception->throw({ - description => 'Server.Internal', - message => 'reseller_id empty in domain delete, still we have a persisting domain reseller.', - }) unless $reseller_id; - # Oooops! Breaks data encapsulation heinously! :o/ - $self->storage->dbh_do(sub { - my (undef, $dbh, @bind) = @_; - $dbh->do( - 'DELETE FROM provisioning.pvs - USING provisioning.voip_subscribers pvs - INNER JOIN billing.voip_subscribers bvs - INNER JOIN billing.contracts bc - WHERE pvs.uuid = bvs.uuid - AND bvs.contract_id = bc.id - AND bvs.domain_id = ? - AND bc.reseller_id = ?', - {}, - @bind - ); - }, $dbdom->{id}, $reseller_id); - $self->_delete_domain_contracts_and_subscribers($dbdom->{id}, $reseller_id); - } - return $dc; - } - }); - return; -} - -method _delete_domain_contracts_and_subscribers($domain_id, $reseller_id) { - # remove contracts which only have subscribers within - # the domain that is to be deleted - $self->resultset('contracts')->search( - { - 'voip_subscribers.contract_id' => {-ident => 'me.id'}, - 'voip_subscribers.domain_id' => $domain_id, - 'voip_subscribers_2.contract_id' => {-ident => 'me.id'}, - 'voip_subscribers_2.domain_id' => {q{!=} => $domain_id}, - 'voip_subscribers_2.domain_id' => undef, - defined($reseller_id) - ? (reseller_id => $reseller_id) - : () - }, - { - join => ['voip_subscribers', 'voip_subscribers'], - } - )->delete_all; - # delete remaining subscribers within the domain that - # is to be deleted - if ($reseller_id) { - $self->resultset('voip_subscribers')->search( - { - contract_id => {-ident => 'id'}, - 'contracts.reseller_id' => $reseller_id, - domain_id => $domain_id, - }, - { - join => 'contracts' - } - )->delete_all; - } else { - $self->resultset('voip_subscribers')->search( - { - domain_id => $domain_id - } - )->delete_all; - } - return; -} - -$CLASS->meta->make_immutable(inline_constructor => 0); - -__END__ - -=encoding UTF-8 - -=head1 NAME - -NGCP::Schema::billing - billing schema - -=head1 VERSION - -This document describes NGCP::Schema::billing version 1.003 - -=head1 SYNOPSIS - - use NGCP::Schema::billing qw(); - -=head1 DESCRIPTION - -This is a port of F and -F in F. - -=head1 INTERFACE - -=head2 Composition - - NGCP::Schema::billing - ISA DBIx::Class::Schema - -All methods and attributes not mentioned here are inherited from -L. - -=head2 Attributes - -None. - -=head2 Methods - -=head3 C - - get_domain($reseller_id, $domain) - -This method retrieves a domain from the DB. Returns a fault if the -domain can not be found in the database. - -=head3 C - - create_domain($data, $reseller_id?) - -This function creates a new domain in the database. - -=head3 C - - delete_domain($data, $reseller_id) - -This function deletes a domain from the database. Will delete all -subscribers that use this domain too! -Returns a fault if the domain can not be found in the database. On -success, returns the number of remaining domain resellers for the -domain. - -=head2 Exports - -None. - -=head1 DIAGNOSTICS - -All exceptions are of type L. They are listed by -their C attribute. - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head1 CONFIGURATION AND ENVIRONMENT - -See L. - -=head1 DEPENDENCIES - -See meta file in the source distribution. - -=head1 INCOMPATIBILITIES - -None reported. - -=head1 BUGS AND LIMITATIONS - -L - -No known limitations. - -=head1 TO DO - -Nothing so far. - -=head1 SEE ALSO - -L - -=head1 AUTHOR - -Lars Dieckow C<< >> - -=head1 LICENCE - -restricted diff --git a/lib/NGCP/Schema/carrier.pm b/lib/NGCP/Schema/carrier.pm deleted file mode 100644 index d75a31f2..00000000 --- a/lib/NGCP/Schema/carrier.pm +++ /dev/null @@ -1,26 +0,0 @@ -package NGCP::Schema::carrier; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:51:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cmbKPM+l0sSqlara6KgQng - -use MooseX::ClassAttribute qw(class_has); - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); - -method connection { - $self->SUPER::connection($self->config->as_hash->{carrierdb}); -} - -__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/NGCP/Schema/kamailio.pm b/lib/NGCP/Schema/kamailio.pm deleted file mode 100644 index f4ec8bbe..00000000 --- a/lib/NGCP/Schema/kamailio.pm +++ /dev/null @@ -1,26 +0,0 @@ -package NGCP::Schema::kamailio; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:51:58 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tnyRnnaNxwcR9xtrvrlVEw - -use MooseX::ClassAttribute qw(class_has); - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); - -method connection { - $self->SUPER::connection($self->config->as_hash->{kamailiodb}); -} - -__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/NGCP/Schema/ngcp.pm b/lib/NGCP/Schema/ngcp.pm deleted file mode 100644 index 0d137814..00000000 --- a/lib/NGCP/Schema/ngcp.pm +++ /dev/null @@ -1,26 +0,0 @@ -package NGCP::Schema::ngcp; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:52:02 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ce7eg6rjP6JwVYslKMDL6g - -use MooseX::ClassAttribute qw(class_has); - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); - -method connection { - $self->SUPER::connection($self->config->as_hash->{ngcpdb}); -} - -__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/lib/NGCP/Schema/provisioning.pm b/lib/NGCP/Schema/provisioning.pm deleted file mode 100644 index bc9bc9d2..00000000 --- a/lib/NGCP/Schema/provisioning.pm +++ /dev/null @@ -1,242 +0,0 @@ -package NGCP::Schema::provisioning; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:52:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xhGnBU3HRx5o/2tOql+KoA - -use MooseX::ClassAttribute qw(class_has); -use NGCP::Schema qw(); -use aliased 'NGCP::Schema::Exception'; - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); -has('validator', is => 'rw', isa => 'NGCP::Schema', lazy => 1, default => sub { return NGCP::Schema->new; }); - -method connection { - $self->SUPER::connection($self->config->as_hash->{provisioningdb}); -} - -method _get_domain_id($domain) { - my $domainid; - try { - $domainid = $self->resultset('voip_domains')->search({domain => $domain})->first->id; - }; - Exception->throw({ - description => 'Client.Voip.NoSuchDomain', - message => "domain '$domain' does not exist", - context => {object => $domain} - }) unless defined $domainid; - return $domainid; -} - -method create_domain($data) { -# FIXME MXMS validation should throw objects - Exception->throw({ - description => 'Client.Syntax.MissingParam', - message => "missing parameter 'domain' in request", - }) unless exists $data->{domain}; - Exception->throw({ - description => 'Client.Syntax.MalformedDomain', - message => "malformed domain '$data->{domain}' in request", - }) unless $self->validator->check_domain({domain => $data->{domain}}); -# /FIXME - - $self->txn_do(sub { - # FIXME ack-basswards exception check: abused for control flow - eval { - $self->_get_domain_id($data->{domain}); - 1; - } and Exception->throw({ - description => 'Client.Voip.ExistingDomain', - message => "domain '$data->{domain}' already exists in the operations database", - context => {object => $data->{domain}}, - }); - $self->resultset('voip_domains')->create({domain => $data->{domain}}); - }); - return; -} - -method get_domain($data) { - Exception->throw({ - description => 'Client.Syntax.MissingParam', - message => "missing parameter 'domain' in request", - }) unless exists $data->{domain}; - Exception->throw({ - description => 'Client.Syntax.MalformedDomain', - message => "malformed domain '$data->{domain}' in request", - }) unless $self->validator->check_domain({domain => $data->{domain}}); - return $self->resultset('voip_domains')->search({id => $self->_get_domain_id($data->{domain})}); -} - -method update_domain($data) { - Exception->throw({ - description => 'Client.Syntax.MissingParam', - message => "missing parameter 'domain' in request", - }) unless exists $data->{domain}; - Exception->throw({ - description => 'Client.Syntax.MalformedDomain', - message => "malformed domain '$data->{domain}' in request", - }) unless $self->validator->check_domain({domain => $data->{domain}}); - $self->txn_do(sub { - my $domainid = $self->_get_domain_id($data->{domain}); - }); - return; -} - -method delete_domain($data) { - Exception->throw({ - description => 'Client.Syntax.MissingParam', - message => "missing parameter 'domain' in request", - }) unless exists $data->{domain}; - Exception->throw({ - description => 'Client.Syntax.MalformedDomain', - message => "malformed domain '$data->{domain}' in request", - }) unless $self->validator->check_domain({domain => $data->{domain}}); - $self->txn_do(sub { - my $domainid = $self->_get_domain_id($data->{domain}); - $self->resultset('voip_domains')->search( - {}, - { - id => $domainid - } - )->delete_all; - }); - return; -} - -$CLASS->meta->make_immutable(inline_constructor => 0); - -__END__ - -=encoding UTF-8 - -=head1 NAME - -NGCP::Schema::provisioning - provisioning schema - -=head1 VERSION - -This document describes NGCP::Schema::provisioning version 1.003 - -=head1 SYNOPSIS - - use NGCP::Schema::provisioning qw(); - -=head1 DESCRIPTION - -This is a port of F and -F in F. - -=head1 INTERFACE - -=head2 Composition - - NGCP::Schema::provisioning - ISA DBIx::Class::Schema - -All methods and attributes not mentioned here are inherited from -L. - -=head2 Attributes - -None. - -=head2 Methods - -=head3 C - - get_domain($data) - -This method retrieves a domain from the DB. Returns a fault if the -domain can not be found in the database. - -=head3 C - - create_domain($data) - -This function creates a new domain in the database. - -=head3 C - - update_domain($data) - -This function modifies a domain in the database. As there is no domain -data at the moment, this function does nothing but check whether the -domain exists. - -=head3 C - - delete_domain($data) - -This function deletes a domain from the database. Will delete all -subscribers that use this domain too! -Returns a fault if the domain can not be found in the database. - -=head2 Exports - -None. - -=head1 DIAGNOSTICS - -All exceptions are of type L. They are listed by -their C attribute. - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head2 C - -C attribute is C - -=head1 CONFIGURATION AND ENVIRONMENT - -See L. - -=head1 DEPENDENCIES - -See meta file in the source distribution. - -=head1 INCOMPATIBILITIES - -None reported. - -=head1 BUGS AND LIMITATIONS - -L - -No known limitations. - -=head1 TO DO - -Nothing so far. - -=head1 SEE ALSO - -L - -=head1 AUTHOR - -Lars Dieckow C<< >> - -=head1 LICENCE - -restricted diff --git a/lib/NGCP/Schema/sipstats.pm b/lib/NGCP/Schema/sipstats.pm deleted file mode 100644 index 4852f1c5..00000000 --- a/lib/NGCP/Schema/sipstats.pm +++ /dev/null @@ -1,26 +0,0 @@ -package NGCP::Schema::sipstats; -use Sipwise::Base; -our $VERSION = '1.003'; - -# Created by DBIx::Class::Schema::Loader -# DO NOT MODIFY THE FIRST PART OF THIS FILE - -extends 'DBIx::Class::Schema'; - -__PACKAGE__->load_namespaces; - - -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-06-27 12:52:12 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NDbjEnoBZ1UdI18njOuvnQ - -use MooseX::ClassAttribute qw(class_has); - -class_has('config', is => 'rw', isa => 'NGCP::Schema::Config', lazy => 1, default => sub { - return NGCP::Schema::Config->instance; -}); - -method connection { - $self->SUPER::connection($self->config->as_hash->{sipstatsdb}); -} - -__PACKAGE__->meta->make_immutable(inline_constructor => 0); diff --git a/t/compile.t b/t/compile.t index 9de9d803..3a8324ed 100644 --- a/t/compile.t +++ b/t/compile.t @@ -4,21 +4,10 @@ use Test::Fatal qw(exception); use Test::More import => [qw(done_testing ok)]; ok use_module('NGCP::Schema::Config')->instance->config_file('t/test.conf'), 'config'; - -for my $class_name (qw( - accounting - billing - carrier - kamailio - ngcp - provisioning - sipstats -)) { - ok(my $class = use_module("NGCP::Schema::$class_name"), "+ load $class_name"); - ok(my $schema = $class->connect, "+ connect $class_name"); - for my $source (sort $schema->sources) { - ok(!exception { $schema->resultset($source)->first }, "select $class_name.$source"); - } +ok(my $class = use_module('NGCP::Schema'), 'load schema'); +ok(my $schema = $class->connect, 'connect'); +for my $source (sort $schema->sources) { + ok(!exception { $schema->resultset($source)->first }, "select $source"); } done_testing; diff --git a/t/test.conf b/t/test.conf index c7fa7d3f..0396f4a8 100644 --- a/t/test.conf +++ b/t/test.conf @@ -27,43 +27,10 @@ voicemail_map_via_number="0"> - - - - - - -