Change-Id: I2d8d3b26613582a77a211fa469ce08548071f949changes/00/2900/7
parent
00135fa180
commit
933d3b8d2b
@ -0,0 +1,217 @@
|
||||
package NGCP::Schema::Result::voip_fax_journal;
|
||||
use Scalar::Util qw(blessed);
|
||||
use parent 'DBIx::Class::Core';
|
||||
|
||||
our $VERSION = '2.007';
|
||||
|
||||
__PACKAGE__->load_components(
|
||||
"InflateColumn::DateTime",
|
||||
"Helper::Row::ToJSON",
|
||||
"+NGCP::Schema::InflateColumn::DateTime::EpochString",
|
||||
);
|
||||
|
||||
__PACKAGE__->table("provisioning.voip_fax_journal");
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_auto_increment => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"subscriber_id",
|
||||
{
|
||||
data_type => "integer",
|
||||
default_value => 0,
|
||||
extra => { unsigned => 1 },
|
||||
is_nullable => 0,
|
||||
},
|
||||
"time",
|
||||
{ data_type => "decimal",
|
||||
is_nullable => 0,
|
||||
size => [13, 3],
|
||||
inflate_datetime => 'epoch_milli'
|
||||
},
|
||||
"direction",
|
||||
{
|
||||
data_type => "enum",
|
||||
extra => { list => ["in", "out", "mtf" ] },
|
||||
is_nullable => 0,
|
||||
},
|
||||
"duration",
|
||||
{
|
||||
data_type => "integer",
|
||||
default_value => 0,
|
||||
extra => { unsigned => 1 },
|
||||
is_nullable => 0,
|
||||
},
|
||||
"caller",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"callee",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"pages",
|
||||
{
|
||||
data_type => "integer",
|
||||
default_value => 0,
|
||||
extra => { unsigned => 1 },
|
||||
is_nullable => 0,
|
||||
},
|
||||
"reason",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
"status",
|
||||
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
|
||||
"signal_rate",
|
||||
{
|
||||
data_type => "integer",
|
||||
default_value => 0,
|
||||
extra => { unsigned => 1 },
|
||||
is_nullable => 0,
|
||||
},
|
||||
"quality",
|
||||
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
|
||||
"filename",
|
||||
{ data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
|
||||
"sid",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
);
|
||||
__PACKAGE__->belongs_to(
|
||||
"provisioning_voip_subscriber",
|
||||
"NGCP::Schema::Result::provisioning_voip_subscribers",
|
||||
{ 'foreign.id' => 'self.subscriber_id' },
|
||||
{ cascade_copy => 0, cascade_delete => 0 },
|
||||
);
|
||||
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
|
||||
sub TO_JSON {
|
||||
my ($self) = @_;
|
||||
return {
|
||||
map { blessed($_) && $_->isa('DateTime') ? $_->datetime : $_ } %{ $self->next::method }
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=encoding UTF-8
|
||||
|
||||
=head1 NAME
|
||||
|
||||
NGCP::Schema::Result::voip_fax_journal
|
||||
|
||||
=head1 COMPONENTS LOADED
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime>
|
||||
|
||||
=item * L<DBIx::Class::Helper::Row::ToJSON>
|
||||
|
||||
=back
|
||||
|
||||
=head1 TABLE: C<provisioning.voip_fax_journal>
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_auto_increment: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 subscriber_id
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 0
|
||||
extra: {unsigned => 1}
|
||||
is_nullable: 0
|
||||
|
||||
=head2 time
|
||||
|
||||
data_type: 'decimal'
|
||||
is_nullable: 0
|
||||
size: [13,3]
|
||||
|
||||
=head2 direction
|
||||
|
||||
data_type: 'enum'
|
||||
default_value: 'in'
|
||||
extra: {list => ["in","out","mtf"]}
|
||||
is_nullable: 0
|
||||
|
||||
=head2 duration
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 0
|
||||
extra: {unsigned => 1}
|
||||
is_nullable: 0
|
||||
|
||||
=head2 caller
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 callee
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 pages
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 0
|
||||
extra: {unsigned => 1}
|
||||
is_nullable: 0
|
||||
|
||||
=head2 reason
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 status
|
||||
|
||||
data_type: 'varchar'
|
||||
default_value: (empty string)
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 signal_rate
|
||||
|
||||
data_type: 'integer'
|
||||
default_value: 0
|
||||
extra: {unsigned => 1}
|
||||
is_nullable: 0
|
||||
|
||||
=head2 quality
|
||||
|
||||
data_type: 'varchar'
|
||||
default_value: (empty string)
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 filename
|
||||
|
||||
data_type: 'varchar'
|
||||
default_value: (empty string)
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head2 sid
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</id>
|
||||
|
||||
=back
|
@ -0,0 +1,139 @@
|
||||
package NGCP::Schema::Result::voip_mail_to_fax_acl;
|
||||
use Scalar::Util qw(blessed);
|
||||
use parent 'DBIx::Class::Core';
|
||||
|
||||
our $VERSION = '2.007';
|
||||
|
||||
__PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON");
|
||||
|
||||
__PACKAGE__->table("provisioning.voip_mail_to_fax_acl");
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_auto_increment => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"subscriber_id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_foreign_key => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"from_email",
|
||||
{ data_type => "varchar", is_nullable => 1, size => 255 },
|
||||
"received_from",
|
||||
{ data_type => "varchar", is_nullable => 1, size => 255 },
|
||||
"destination",
|
||||
{ data_type => "varchar", is_nullable => 1, size => 255 },
|
||||
"use_regex",
|
||||
{ data_type => "integer", is_nullable => 0, default_value => 0 },
|
||||
);
|
||||
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"provisioning_voip_subscriber",
|
||||
"NGCP::Schema::Result::provisioning_voip_subscribers",
|
||||
{ id => "subscriber_id" },
|
||||
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
|
||||
);
|
||||
|
||||
sub TO_JSON {
|
||||
my ($self) = @_;
|
||||
return {
|
||||
map { blessed($_) && $_->isa('DateTime') ? $_->datetime : $_ } %{ $self->next::method }
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=encoding UTF-8
|
||||
|
||||
=head1 NAME
|
||||
|
||||
NGCP::Schema::Result::voip_mail_to_fax_acl
|
||||
|
||||
=head1 COMPONENTS LOADED
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime>
|
||||
|
||||
=item * L<DBIx::Class::Helper::Row::ToJSON>
|
||||
|
||||
=back
|
||||
|
||||
=head1 TABLE: C<provisioning.voip_mail_to_fax_acl>
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_auto_increment: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 subscriber_id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_foreign_key: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 from_email
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 1
|
||||
size: 255
|
||||
|
||||
=head2 received_from
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 1
|
||||
size: 255
|
||||
|
||||
=head2 destination
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 1
|
||||
size: 255
|
||||
|
||||
=head2 use_regex
|
||||
|
||||
data_type: 'integer'
|
||||
is_nullable: 0
|
||||
default_value: 0
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</id>
|
||||
|
||||
=back
|
||||
|
||||
=head1 UNIQUE CONSTRAINTS
|
||||
|
||||
=head2 C<subdest_idx>
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</subscriber_id>
|
||||
|
||||
=item * L</destination>
|
||||
|
||||
=back
|
||||
|
||||
=head1 RELATIONS
|
||||
|
||||
=head2 subscriber
|
||||
|
||||
Type: belongs_to
|
||||
|
||||
Related object: L<NGCP::Schema::Result::provisioning_voip_subscribers>
|
@ -0,0 +1,150 @@
|
||||
package NGCP::Schema::Result::voip_mail_to_fax_preferences;
|
||||
use Scalar::Util qw(blessed);
|
||||
use parent 'DBIx::Class::Core';
|
||||
|
||||
our $VERSION = '2.007';
|
||||
|
||||
__PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON");
|
||||
|
||||
__PACKAGE__->table("provisioning.voip_mail_to_fax_preferences");
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_auto_increment => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"subscriber_id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_foreign_key => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"active",
|
||||
{ data_type => "tinyint", default_value => 0, is_nullable => 0 },
|
||||
"secret_key",
|
||||
{ data_type => "varchar", is_nullable => 1 },
|
||||
"last_secret_key_modify",
|
||||
{
|
||||
data_type => 'timestamp',
|
||||
datetime_undef_if_invalid => 1,
|
||||
default_value => '0000-00-00 00:00:00',
|
||||
is_nullable => 0,
|
||||
},
|
||||
"secret_key_renew",
|
||||
{
|
||||
data_type => "enum",
|
||||
default_value => "never",
|
||||
extra => { list => ["never", "daily", "weekly", "monthly"] },
|
||||
is_nullable => 0,
|
||||
},
|
||||
);
|
||||
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
|
||||
__PACKAGE__->add_unique_constraint("subscriberid_idx", ["subscriber_id"]);
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"provisioning_voip_subscriber",
|
||||
"NGCP::Schema::Result::provisioning_voip_subscribers",
|
||||
{ id => "subscriber_id" },
|
||||
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
|
||||
);
|
||||
|
||||
sub TO_JSON {
|
||||
my ($self) = @_;
|
||||
return {
|
||||
map { blessed($_) && $_->isa('DateTime') ? $_->datetime : $_ } %{ $self->next::method }
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=encoding UTF-8
|
||||
|
||||
=head1 NAME
|
||||
|
||||
NGCP::Schema::Result::voip_mail_to_fax_preferences
|
||||
|
||||
=head1 COMPONENTS LOADED
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime>
|
||||
|
||||
=item * L<DBIx::Class::Helper::Row::ToJSON>
|
||||
|
||||
=back
|
||||
|
||||
=head1 TABLE: C<provisioning.voip_mail_to_fax_preferences>
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_auto_increment: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 subscriber_id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_foreign_key: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 active
|
||||
|
||||
data_type: 'tinyint'
|
||||
default_value: 0
|
||||
is_nullable: 0
|
||||
|
||||
=head2 secret_key
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 1
|
||||
|
||||
=head2 last_secret_key_modify
|
||||
|
||||
data_type: 'timestamp',
|
||||
datetime_undef_if_invalid: 1
|
||||
default_value: '0000-00-00 00:00:00'
|
||||
is_nullable: 0
|
||||
|
||||
=head2 secret_key_renew
|
||||
|
||||
data_type: 'enum'
|
||||
default_value: 'never'
|
||||
extra: {list => ["never","daily","weekly","monthly"]}
|
||||
is_nullable: 0
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</id>
|
||||
|
||||
=back
|
||||
|
||||
=head1 UNIQUE CONSTRAINTS
|
||||
|
||||
=head2 C<subscriberid_idx>
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</subscriber_id>
|
||||
|
||||
=back
|
||||
|
||||
=head1 RELATIONS
|
||||
|
||||
=head2 subscriber
|
||||
|
||||
Type: belongs_to
|
||||
|
||||
Related object: L<NGCP::Schema::Result::provisioning_voip_subscribers>
|
@ -0,0 +1,117 @@
|
||||
package NGCP::Schema::Result::voip_mail_to_fax_secret_renew_notify;
|
||||
use Scalar::Util qw(blessed);
|
||||
use parent 'DBIx::Class::Core';
|
||||
|
||||
our $VERSION = '2.007';
|
||||
|
||||
__PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON");
|
||||
|
||||
__PACKAGE__->table("provisioning.voip_mail_to_fax_secret_renew_notify");
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
"id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_auto_increment => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"subscriber_id",
|
||||
{
|
||||
data_type => "integer",
|
||||
extra => { unsigned => 1 },
|
||||
is_foreign_key => 1,
|
||||
is_nullable => 0,
|
||||
},
|
||||
"destination",
|
||||
{ data_type => "varchar", is_nullable => 0, size => 255 },
|
||||
);
|
||||
|
||||
__PACKAGE__->set_primary_key("id");
|
||||
|
||||
__PACKAGE__->add_unique_constraint("subdest_idx", ["subscriber_id", "destination"]);
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"provisioning_voip_subscriber",
|
||||
"NGCP::Schema::Result::provisioning_voip_subscribers",
|
||||
{ id => "subscriber_id" },
|
||||
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
|
||||
);
|
||||
|
||||
sub TO_JSON {
|
||||
my ($self) = @_;
|
||||
return {
|
||||
map { blessed($_) && $_->isa('DateTime') ? $_->datetime : $_ } %{ $self->next::method }
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=encoding UTF-8
|
||||
|
||||
=head1 NAME
|
||||
|
||||
NGCP::Schema::Result::voip_mail_to_fax_secret_renew_notify
|
||||
|
||||
=head1 COMPONENTS LOADED
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L<DBIx::Class::InflateColumn::DateTime>
|
||||
|
||||
=item * L<DBIx::Class::Helper::Row::ToJSON>
|
||||
|
||||
=back
|
||||
|
||||
=head1 TABLE: C<provisioning.voip_mail_to_fax_secret_renew_notify>
|
||||
|
||||
=head1 ACCESSORS
|
||||
|
||||
=head2 id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_auto_increment: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 subscriber_id
|
||||
|
||||
data_type: 'integer'
|
||||
extra: {unsigned => 1}
|
||||
is_foreign_key: 1
|
||||
is_nullable: 0
|
||||
|
||||
=head2 destination
|
||||
|
||||
data_type: 'varchar'
|
||||
is_nullable: 0
|
||||
size: 255
|
||||
|
||||
=head1 PRIMARY KEY
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</id>
|
||||
|
||||
=back
|
||||
|
||||
=head1 UNIQUE CONSTRAINTS
|
||||
|
||||
=head2 C<subdest_idx>
|
||||
|
||||
=over 4
|
||||
|
||||
=item * L</subscriber_id>
|
||||
|
||||
=item * L</destination>
|
||||
|
||||
=back
|
||||
|
||||
=head1 RELATIONS
|
||||
|
||||
=head2 subscriber
|
||||
|
||||
Type: belongs_to
|
||||
|
||||
Related object: L<NGCP::Schema::Result::provisioning_voip_subscribers>
|
Loading…
Reference in new issue