package NGCP::Schema::billing::Result::voip_subscribers; use Sipwise::Base; use MooseX::NonMoose; our $VERSION = '1.001'; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE extends 'DBIx::Class::Core'; __PACKAGE__->load_components("InflateColumn::DateTime"); __PACKAGE__->table("voip_subscribers"); __PACKAGE__->add_columns( "id", { data_type => "integer", extra => { unsigned => 1 }, is_auto_increment => 1, is_nullable => 0, }, "contract_id", { data_type => "integer", extra => { unsigned => 1 }, is_foreign_key => 1, is_nullable => 0, }, "uuid", { data_type => "char", is_nullable => 0, size => 36 }, "username", { data_type => "varchar", is_nullable => 0, size => 127 }, "domain_id", { data_type => "integer", extra => { unsigned => 1 }, is_foreign_key => 1, is_nullable => 0, }, "status", { data_type => "enum", default_value => "active", extra => { list => ["active", "locked", "terminated"] }, is_nullable => 0, }, "primary_number_id", { data_type => "integer", extra => { unsigned => 1 }, is_foreign_key => 1, is_nullable => 1, }, "external_id", { data_type => "varchar", is_nullable => 1, size => 255 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->add_unique_constraint("uuid_idx", ["uuid"]); __PACKAGE__->belongs_to( "contract", "NGCP::Schema::billing::Result::contracts", { id => "contract_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); __PACKAGE__->belongs_to( "domain", "NGCP::Schema::billing::Result::domains", { id => "domain_id" }, { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); __PACKAGE__->belongs_to( "primary_number", "NGCP::Schema::billing::Result::voip_numbers", { id => "primary_number_id" }, { is_deferrable => 1, join_type => "LEFT", on_delete => "SET NULL", on_update => "CASCADE", }, ); __PACKAGE__->has_many( "voip_numbers", "NGCP::Schema::billing::Result::voip_numbers", { "foreign.subscriber_id" => "self.id" }, { cascade_copy => 0, cascade_delete => 0 }, ); =encoding UTF-8 =head1 NAME NGCP::Schema::billing::Result::voip_subscribers =head1 COMPONENTS LOADED =over 4 =item * L =back =head1 TABLE: C =head1 ACCESSORS =head2 id data_type: 'integer' extra: {unsigned => 1} is_auto_increment: 1 is_nullable: 0 =head2 contract_id data_type: 'integer' extra: {unsigned => 1} is_foreign_key: 1 is_nullable: 0 =head2 uuid data_type: 'char' is_nullable: 0 size: 36 =head2 username data_type: 'varchar' is_nullable: 0 size: 127 =head2 domain_id data_type: 'integer' extra: {unsigned => 1} is_foreign_key: 1 is_nullable: 0 =head2 status data_type: 'enum' default_value: 'active' extra: {list => ["active","locked","terminated"]} is_nullable: 0 =head2 primary_number_id data_type: 'integer' extra: {unsigned => 1} is_foreign_key: 1 is_nullable: 1 =head2 external_id data_type: 'varchar' is_nullable: 1 size: 255 =head1 PRIMARY KEY =over 4 =item * L =back =head1 UNIQUE CONSTRAINTS =head2 C =over 4 =item * L =back =head1 RELATIONS =head2 contract Type: belongs_to Related object: L =head2 domain Type: belongs_to Related object: L =head2 primary_number Type: belongs_to Related object: L =head2 voip_numbers Type: has_many Related object: L =cut # Created by DBIx::Class::Schema::Loader v0.07035 @ 2013-05-14 16:26:01 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/mMT/Ej0fa3n8zSnX0OIPA # You can replace this text with custom code or comments, and it will be preserved on regeneration __PACKAGE__->meta->make_immutable; 1;